[jboss-cvs] JBossAS SVN: r81054 - in trunk/embedded: docs/tutorial/junit and 54 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 14 10:02:55 EST 2008


Author: dimitris at jboss.org
Date: 2008-11-14 10:02:54 -0500 (Fri, 14 Nov 2008)
New Revision: 81054

Modified:
   trunk/embedded/DOCUMENTATION.html
   trunk/embedded/INSTALLATION.html
   trunk/embedded/binary.bat
   trunk/embedded/build-test.xml
   trunk/embedded/build.bat
   trunk/embedded/build.sh
   trunk/embedded/compiler.bat
   trunk/embedded/docs/tutorial/junit/README.html
   trunk/embedded/docs/tutorial/junit/build.xml
   trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/Customer.java
   trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOBean.java
   trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOLocal.java
   trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAORemote.java
   trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/ExampleMDB.java
   trunk/embedded/docs/tutorial/junit/src/main/resources/META-INF/persistence.xml
   trunk/embedded/docs/tutorial/junit/src/main/resources/queue-service.xml
   trunk/embedded/docs/tutorial/junit/src/main/resources/tutorial-persistence.xml
   trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/AllTests.java
   trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EasierEjbTestCase.java
   trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EjbTestCase.java
   trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/JarByResourceTestCase.java
   trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/MdbTestCase.java
   trunk/embedded/docs/tutorial/plain-java-application/README.html
   trunk/embedded/docs/tutorial/plain-java-application/build.xml
   trunk/embedded/docs/tutorial/plain-java-application/resources/META-INF/persistence.xml
   trunk/embedded/docs/tutorial/plain-java-application/resources/tutorial-persistence.xml
   trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/ClasspathDeploy.java
   trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/DeployJarFromResourceBase.java
   trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/Main.java
   trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy.java
   trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy2.java
   trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/Customer.java
   trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOBean.java
   trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOLocal.java
   trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAORemote.java
   trunk/embedded/docs/tutorial/tomcat/README.html
   trunk/embedded/docs/tutorial/tomcat/build.xml
   trunk/embedded/docs/tutorial/tomcat/resources/META-INF/persistence.xml
   trunk/embedded/docs/tutorial/tomcat/resources/builtin.web.xml
   trunk/embedded/docs/tutorial/tomcat/resources/finegrain.web.xml
   trunk/embedded/docs/tutorial/tomcat/resources/scan.webinf.lib.xml
   trunk/embedded/docs/tutorial/tomcat/src/EmbeddedJBoss.jsp
   trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/Customer.java
   trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOBean.java
   trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOLocal.java
   trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAORemote.java
   trunk/embedded/embedded.bat
   trunk/embedded/lgpl.html
   trunk/embedded/src/main/java/org/jboss/embedded/BeanCompiler.java
   trunk/embedded/src/main/java/org/jboss/embedded/BinaryBootstrap.java
   trunk/embedded/src/main/java/org/jboss/embedded/Bootstrap.java
   trunk/embedded/src/main/java/org/jboss/embedded/ClassLoaderDeployer.java
   trunk/embedded/src/main/java/org/jboss/embedded/DeploymentGroup.java
   trunk/embedded/src/main/java/org/jboss/embedded/DeploymentScanner.java
   trunk/embedded/src/main/java/org/jboss/embedded/ServletContextResourceScanner.java
   trunk/embedded/src/main/java/org/jboss/embedded/WebInfLibScanner.java
   trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoader.java
   trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoaderMBean.java
   trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernel.java
   trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernelMBean.java
   trunk/embedded/src/main/java/org/jboss/embedded/adapters/LocalOnlyUserTransaction.java
   trunk/embedded/src/main/java/org/jboss/embedded/adapters/ServerConfig.java
   trunk/embedded/src/main/java/org/jboss/embedded/jndi/BridgeContext.java
   trunk/embedded/src/main/java/org/jboss/embedded/jndi/DelegatingContextFactory.java
   trunk/embedded/src/main/java/org/jboss/embedded/jndi/KernelInitializingContextFactory.java
   trunk/embedded/src/main/java/org/jboss/embedded/jndi/WrappingContext.java
   trunk/embedded/src/main/java/org/jboss/embedded/junit/BaseTestCase.java
   trunk/embedded/src/main/java/org/jboss/embedded/junit/ClasspathBasedTestServices.java
   trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestCase.java
   trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestSetup.java
   trunk/embedded/src/main/java/org/jboss/embedded/tomcat/EmbeddedJBossBootstrapListener.java
   trunk/embedded/src/main/java/org/jboss/embedded/tomcat/WebinfScanner.java
   trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/ENCFactory.java
   trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/KernelInitializingContextFactory.java
   trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/TomcatBridgeContextFactory.java
   trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/java/javaURLContextFactory.java
   trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecurityAssociationValve.java
   trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecuritySetupListener.java
   trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/TomcatLoginModule.java
   trunk/embedded/src/main/java/org/jboss/embedded/url/BridgeHandlerFactory.java
   trunk/embedded/src/main/java/org/jboss/embedded/url/HandlerFactoryHack.java
   trunk/embedded/src/main/java/org/jboss/embedded/url/JavaProtocolHandlerPkgs.java
   trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperties.java
   trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperty.java
   trunk/embedded/src/main/java/org/jboss/naming/JBossRemotingContextFactory.java
   trunk/embedded/src/main/java/org/jboss/naming/SecurityAssociationActions.java
   trunk/embedded/src/main/resources/javase/META-INF/persistence.properties
   trunk/embedded/src/main/resources/javase/conf/bootstrap-beans.xml
   trunk/embedded/src/main/resources/javase/conf/jboss-service.xml
   trunk/embedded/src/main/resources/javase/conf/login-config.xml
   trunk/embedded/src/main/resources/javase/deploy/ejb3-interceptors-aop.xml
   trunk/embedded/src/main/resources/javase/deploy/hsqldb-ds.xml
   trunk/embedded/src/main/resources/javase/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
   trunk/embedded/src/main/resources/javase/deploy/remoting-service.xml
   trunk/embedded/src/main/resources/javase/deployers/aspect-deployer-beans.xml
   trunk/embedded/src/main/resources/javase/deployers/ejb-deployer-beans.xml
   trunk/embedded/src/main/resources/javase/deployers/ejb3-deployers-beans.xml
   trunk/embedded/src/main/resources/javase/deployers/jboss-aspect-library-beans.xml
   trunk/embedded/src/main/resources/javase/deployers/jca-deployers-beans.xml
   trunk/embedded/src/main/resources/javase/deployers/metadata-deployer-beans.xml
   trunk/embedded/src/main/resources/javase/deployers/security-deployer-beans.xml
   trunk/embedded/src/main/resources/javase/jndi.properties
   trunk/embedded/src/main/resources/javase/log4j.xml
   trunk/embedded/src/main/resources/javase/stylesheets/NoJRMPConnectionFactoryTemplate.xsl
   trunk/embedded/src/main/resources/stylesheets/NoJRMPConnectionFactoryTemplate.xsl
   trunk/embedded/src/main/resources/tomcat-jndi.properties
   trunk/embedded/src/test/java/org/jboss/embedded/test/BeanCompilerTester.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/SimpleBean.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBinaryBootstrap.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBootstrap.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/bootstrap/unit/BootstrapTestCase.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Customer.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAO.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAOBean.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbJBossTestCase.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.jsp
   trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/EjbTestCase.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/MdbTestCase.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/VfsTestCase.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/jndibootstrap/unit/BootstrapTestCase.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/ExampleMDB.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/unit/MdbTestCase.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/remote/Test.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/remote/TestBean.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/remote/unit/EjbTestCase.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/Customer.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAO.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAOBean.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorld.java
   trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorldBean.java
   trunk/embedded/src/test/resources/ejb/META-INF/persistence.xml
   trunk/embedded/src/test/resources/ejb/roles.properties
   trunk/embedded/src/test/resources/ejb/users.properties
   trunk/embedded/src/test/resources/mdb/mdbtest-service.xml
   trunk/embedded/src/test/resources/vfs-test-persistence.xml
   trunk/embedded/src/test/resources/war-resource/web.xml
   trunk/embedded/src/test/resources/war-scan/web.xml
   trunk/embedded/src/test/resources/war-security/Test.jsp
   trunk/embedded/src/test/resources/war-security/WEB-INF/web.xml
   trunk/embedded/src/test/resources/war-security/hello.html
Log:
fix svn properties

Modified: trunk/embedded/DOCUMENTATION.html
===================================================================
--- trunk/embedded/DOCUMENTATION.html	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/DOCUMENTATION.html	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,16 +1,16 @@
-<html>
-<body>
-<p>
-<h2> Documentation</h2>
-
-</p><p>
-The bulk of the documentation for Embedded JBoss is online on our <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedJBoss">wiki</a>.  Please feel free to update, fix, or add additional documentation!  Help the community!
-</p><p>
-Additionally, there are a few other resources that come with the distribution:
-<ul>
-<li> <a href="docs/api/index.html">Javadocs</a></li>
-<li> <a href="docs/tutorial">Tutorials</a></li>
-</ul>
-</p>
-</body>
-</html>
+<html>
+<body>
+<p>
+<h2> Documentation</h2>
+
+</p><p>
+The bulk of the documentation for Embedded JBoss is online on our <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedJBoss">wiki</a>.  Please feel free to update, fix, or add additional documentation!  Help the community!
+</p><p>
+Additionally, there are a few other resources that come with the distribution:
+<ul>
+<li> <a href="docs/api/index.html">Javadocs</a></li>
+<li> <a href="docs/tutorial">Tutorials</a></li>
+</ul>
+</p>
+</body>
+</html>


Property changes on: trunk/embedded/DOCUMENTATION.html
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/INSTALLATION.html
===================================================================
--- trunk/embedded/INSTALLATION.html	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/INSTALLATION.html	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,11 +1,11 @@
-<html>
-<body>
-<p>
-<h2> Installation</h2>
-
-</p><p>
-Please see our online <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedJBoss">wiki</a> for more information.
-</p><p>
-</p>
-</body>
-</html>
+<html>
+<body>
+<p>
+<h2> Installation</h2>
+
+</p><p>
+Please see our online <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedJBoss">wiki</a> for more information.
+</p><p>
+</p>
+</body>
+</html>


Property changes on: trunk/embedded/INSTALLATION.html
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/binary.bat
___________________________________________________________________
Name: svn:eol-style
   + native


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


Property changes on: trunk/embedded/build.bat
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:eol-style
   + native


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


Property changes on: trunk/embedded/compiler.bat
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/README.html
===================================================================
--- trunk/embedded/docs/tutorial/junit/README.html	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/README.html	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,97 +1,97 @@
-<html>
-<body>
-<p>
-<h2> Junit testing with Embedded JBoss</h2>
-
-</p><p>
-This tutorial project can be built and run in three different ways:
-</p><p>
-<ul>
-<li> Within Intellij IDEA 6.0.x.  Double click on the example.ipr file.  Right click to run any of the example tests.</li>
-<li> Within Eclipse 3.2.2.  We couldn't find a good of packaging this (probably due to Eclipse ignorance), but import the .project file that is in the root of the Embedded JBoss distribution.  This will set up this example.</li>
-<li> As a standalone Ant script, build.xml within the root directory.  There are a few ant tasks that you can run:</li>
-<ul>
-<li> <i>tests</i> will run every junit test under src/test/org/jboss/embedded/tutorial/junit.  It will create a text and XML report in build/reports for each test case</li>
-<li> <i>all-tests</i> will run the single junit test src/test/org/jboss/embedded/tutorial/AllTests.java.  It will create a text and XML report in build/reports.  Compare the run times between the <i>tests</i> target and the <i>all-tests</i> target.</li>
-<li> <i>tests-report-html</i> creates a nice HTML view of the test generated reports that you can find under build/reports/html/index.html</li>
-</ul>
-</ul>
-</p><p>
-Each unit test shows a different way of doing things and use different pieces of the Bootstrap and AssembledDirectory APIs.
-</p><p>
-<h2> Learning about junit testing</h2>
-
-</p><p>
-There are certain issues with Embedded JBoss that you have to worry about when doing unit testing.
-</p><p>
-<h3>Bootstrap.bootstrap() and shutdown() can only be called once per JVM</h3>
-
-</p><p>
-This is perhaps the biggest problem when using Embedded JBoss in unit testing.  There are various situations where you run unit tests:
-</p><p>
-<ol>
-<li> Running one test method in a particular class</li>
-
-<li> Running all tests in a particular class</li>
-
-<li> Running all test classes in your IDE that are within a directory structure</li>
-</ol>
-
-</p><p>
-How do you write your junit classes so that they can run in each of these scenarios?  Solving #1 is easy.  Just call bootstrap() and shutdown() in overriden setup() and tearDown() methods of your test class.  The problem with this approach is that you will no longer be able to run in situations #2 and #3 because junit instantiates, by default, an instance of each test class per test method.  In scenario #3, it becomes even worse because many IDE's will run all unit tests within the same JVM, thus you'll have the same exact problem.
-</p><p>
-The solution is a simple one.  Call bootstrap() only once, and never call shutdown().  Here's how you might do it:
-</p><p>
-<pre>
-
-public class MyTestCase extends TestCase
-{
-
-
-   @Override
-   protected void setUp() throws Exception
-   {
-      if (!Bootstrap.getInstance().isStarted()) Bootstrap.getInstance().bootstrap();
-   }
-
-...
-
-}
-
-</pre>
-</p><p>
-<h3>How do I deploy something only once per test run?</h3>
-
-</p><p>
-At first thought, deploying your embedded archives in the setUp() method and undeploying in tearDown() of your TestCases sounds like a good idea.
-But what if you only want to deploy these archives once per test class?  Maybe deployment of any one of these archives takes a long time,
-or maybe you want to retain state between test method invocations.
-To do this, you need to wrap your test class in a TestSetup, yet you want to write your test class so that in can run in scenarios #1-3 shown above.
-One way of doing this is shown in <a href="src/test/java/org/jboss/embedded/tutorial/junit/EjbTestCase.java">org.jboss.embedded.tutorial.junit.EjbTestCase</a>
-</p><p>
-The suite() method creates a TestSuite using a TestSetup that does Bootstrap().bootstrap() in its setUp() method as well as calls the static deploy() method.
-This deploy method deploys the archive you are interested in deploying.
-The overriden setUp() and tearDown() methods determine whether or not initialize happened within the suite() method, or
-whether an individual test method was run from your IDE.  If the test class had not been initialized, it calls Bootstrap.bootstrap() and the deploy() method.
-</p><p>
-Looking at EjbTestCase, that's a lot of code to write.  Embedded JBoss provides a base test class to make it easier for you:  org.jboss.embedded.junit.BaseTestCase.
-<a href="src/test/java/org/jboss/embedded/tutorial/junit/EasierEjbTestCase.java">org.jboss.embedded.tutorial.junit.EasierEjbTestCase</a> shows how you could rewrite EjbTestCase
-using BaseTestCase.
-</p><p>
-BaseTestCase creates the same template internally that we showed explicitly previously.  It looks to see if the test class has implemented a static deploy and/or undeploy method and calls those methods via reflection at the appropriate times.
-</p><p>
-</p><p>
-<h3> Bootstrap.bootstrap() takes 5-6 seconds.  (measured on a 2.4 ghz Core 2 platform)</h3>
-
-</p><p>
-5-6 seconds isn't that long in the grand scheme of things, but starts to add up.  A common thing to do is to automate junit test runs by creating an Ant
-batchtest target within your build.xml file.  The problem with this scenario is that each test will bootstrap Embedded JBoss and
-your entire suite will run very slowly.  In this scenario, it is best to create a suite class that runs all the tests.
-<a href="src/test/java/org/jboss/embedded/tutorial/AllTests.java">org.jboss.embedded.tutorial.AllTests</a>  exemplifies this.
-</p><p>
-</p><p>
-</p><p>
-</p><p>
-</p>
-</body>
-</html>
+<html>
+<body>
+<p>
+<h2> Junit testing with Embedded JBoss</h2>
+
+</p><p>
+This tutorial project can be built and run in three different ways:
+</p><p>
+<ul>
+<li> Within Intellij IDEA 6.0.x.  Double click on the example.ipr file.  Right click to run any of the example tests.</li>
+<li> Within Eclipse 3.2.2.  We couldn't find a good of packaging this (probably due to Eclipse ignorance), but import the .project file that is in the root of the Embedded JBoss distribution.  This will set up this example.</li>
+<li> As a standalone Ant script, build.xml within the root directory.  There are a few ant tasks that you can run:</li>
+<ul>
+<li> <i>tests</i> will run every junit test under src/test/org/jboss/embedded/tutorial/junit.  It will create a text and XML report in build/reports for each test case</li>
+<li> <i>all-tests</i> will run the single junit test src/test/org/jboss/embedded/tutorial/AllTests.java.  It will create a text and XML report in build/reports.  Compare the run times between the <i>tests</i> target and the <i>all-tests</i> target.</li>
+<li> <i>tests-report-html</i> creates a nice HTML view of the test generated reports that you can find under build/reports/html/index.html</li>
+</ul>
+</ul>
+</p><p>
+Each unit test shows a different way of doing things and use different pieces of the Bootstrap and AssembledDirectory APIs.
+</p><p>
+<h2> Learning about junit testing</h2>
+
+</p><p>
+There are certain issues with Embedded JBoss that you have to worry about when doing unit testing.
+</p><p>
+<h3>Bootstrap.bootstrap() and shutdown() can only be called once per JVM</h3>
+
+</p><p>
+This is perhaps the biggest problem when using Embedded JBoss in unit testing.  There are various situations where you run unit tests:
+</p><p>
+<ol>
+<li> Running one test method in a particular class</li>
+
+<li> Running all tests in a particular class</li>
+
+<li> Running all test classes in your IDE that are within a directory structure</li>
+</ol>
+
+</p><p>
+How do you write your junit classes so that they can run in each of these scenarios?  Solving #1 is easy.  Just call bootstrap() and shutdown() in overriden setup() and tearDown() methods of your test class.  The problem with this approach is that you will no longer be able to run in situations #2 and #3 because junit instantiates, by default, an instance of each test class per test method.  In scenario #3, it becomes even worse because many IDE's will run all unit tests within the same JVM, thus you'll have the same exact problem.
+</p><p>
+The solution is a simple one.  Call bootstrap() only once, and never call shutdown().  Here's how you might do it:
+</p><p>
+<pre>
+
+public class MyTestCase extends TestCase
+{
+
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      if (!Bootstrap.getInstance().isStarted()) Bootstrap.getInstance().bootstrap();
+   }
+
+...
+
+}
+
+</pre>
+</p><p>
+<h3>How do I deploy something only once per test run?</h3>
+
+</p><p>
+At first thought, deploying your embedded archives in the setUp() method and undeploying in tearDown() of your TestCases sounds like a good idea.
+But what if you only want to deploy these archives once per test class?  Maybe deployment of any one of these archives takes a long time,
+or maybe you want to retain state between test method invocations.
+To do this, you need to wrap your test class in a TestSetup, yet you want to write your test class so that in can run in scenarios #1-3 shown above.
+One way of doing this is shown in <a href="src/test/java/org/jboss/embedded/tutorial/junit/EjbTestCase.java">org.jboss.embedded.tutorial.junit.EjbTestCase</a>
+</p><p>
+The suite() method creates a TestSuite using a TestSetup that does Bootstrap().bootstrap() in its setUp() method as well as calls the static deploy() method.
+This deploy method deploys the archive you are interested in deploying.
+The overriden setUp() and tearDown() methods determine whether or not initialize happened within the suite() method, or
+whether an individual test method was run from your IDE.  If the test class had not been initialized, it calls Bootstrap.bootstrap() and the deploy() method.
+</p><p>
+Looking at EjbTestCase, that's a lot of code to write.  Embedded JBoss provides a base test class to make it easier for you:  org.jboss.embedded.junit.BaseTestCase.
+<a href="src/test/java/org/jboss/embedded/tutorial/junit/EasierEjbTestCase.java">org.jboss.embedded.tutorial.junit.EasierEjbTestCase</a> shows how you could rewrite EjbTestCase
+using BaseTestCase.
+</p><p>
+BaseTestCase creates the same template internally that we showed explicitly previously.  It looks to see if the test class has implemented a static deploy and/or undeploy method and calls those methods via reflection at the appropriate times.
+</p><p>
+</p><p>
+<h3> Bootstrap.bootstrap() takes 5-6 seconds.  (measured on a 2.4 ghz Core 2 platform)</h3>
+
+</p><p>
+5-6 seconds isn't that long in the grand scheme of things, but starts to add up.  A common thing to do is to automate junit test runs by creating an Ant
+batchtest target within your build.xml file.  The problem with this scenario is that each test will bootstrap Embedded JBoss and
+your entire suite will run very slowly.  In this scenario, it is best to create a suite class that runs all the tests.
+<a href="src/test/java/org/jboss/embedded/tutorial/AllTests.java">org.jboss.embedded.tutorial.AllTests</a>  exemplifies this.
+</p><p>
+</p><p>
+</p><p>
+</p><p>
+</p>
+</body>
+</html>


Property changes on: trunk/embedded/docs/tutorial/junit/README.html
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/build.xml
===================================================================
--- trunk/embedded/docs/tutorial/junit/build.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/build.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,180 +1,180 @@
-<?xml version="1.0"?>
-
-<!-- ======================================================================= -->
-<!-- JBoss build file                                                       -->
-<!-- ======================================================================= -->
-
-<project name="JBoss" default="tests" basedir=".">
-   <property name="src.dir" value="${basedir}/src/main/java"/>
-   <property name="test.src.dir" value="${basedir}/src/test/java"/>
-   <property name="build.dir" value="${basedir}/build"/>
-   <property name="build.reports" value="${basedir}/build/reports"/>
-   <property name="build.stylesheets" value="${basedir}/build/stylesheets"/>
-   <property name="src.stylesheets" value="${basedir}/stylesheets"/>
-   <property name="build.classes.dir" value="${build.dir}/classes"/>
-   <property name="build.test.classes.dir" value="${build.dir}/test-classes"/>
-   <property name="lib.dir" value="../../../lib"/>
-   <property name="optional.lib.dir" value="../../../optional-lib"/>
-   <property name="conf.dir" value="../../../bootstrap"/>
-
-   <!-- =================================================================== -->
-   <!-- Prepares the build directory                                        -->
-   <!-- =================================================================== -->
-   <target name="prepare">
-      <mkdir dir="${build.dir}"/>
-      <mkdir dir="${build.classes.dir}"/>
-      <mkdir dir="${build.test.classes.dir}"/>
-      <!-- Build classpath -->
-      <path id="build.classpath">
-         <fileset dir="${lib.dir}">
-            <include name="*.jar"/>
-         </fileset>
-         <fileset dir="${optional.lib.dir}">
-            <include name="*.jar"/>
-         </fileset>
-         <pathelement location="${build.classes.dir}"/>
-      </path>
-
-      <path id="junit.classpath">
-         <pathelement location="${conf.dir}"/>
-         <pathelement location="${build.test.classes.dir}"/>
-         <fileset dir="${lib.dir}">
-            <include name="*.jar"/>
-         </fileset>
-         <fileset dir="${optional.lib.dir}">
-            <include name="*.jar"/>
-         </fileset>
-         <fileset dir="${build.dir}">
-            <include name="tutorial.jar"/>
-         </fileset>
-      </path>
-
-   </target>
-
-   <!-- =================================================================== -->
-   <!-- Compiles the source code                                            -->
-   <!-- =================================================================== -->
-   <target name="compile" depends="prepare">
-      <javac srcdir="${src.dir}"
-             destdir="${build.classes.dir}"
-             debug="on"
-             deprecation="on"
-             optimize="off"
-             includes="**">
-         <classpath refid="build.classpath"/>
-      </javac>
-      <javac srcdir="${test.src.dir}"
-             destdir="${build.test.classes.dir}"
-             debug="on"
-             deprecation="on"
-             optimize="off"
-             includes="**">
-         <classpath refid="build.classpath"/>
-      </javac>
-   </target>
-
-   <target name="ejbjar" depends="compile">
-      <jar jarfile="build/tutorial.jar">
-         <fileset dir="${build.classes.dir}">
-            <include name="**/beans/*.class"/>
-         </fileset>
-         <fileset dir="src/main/resources">
-            <include name="*.xml"/>
-            <include name="META-INF/persistence.xml"/>
-         </fileset>
-      </jar>
-   </target>
-
-   <target name="tests" depends="ejbjar">
-
-      <mkdir dir="${build.reports}"/>
-      <junit printsummary="yes"
-             haltonerror="false"
-             haltonfailure="false"
-             fork="true">
-
-         <!-- clean shutdown so we don't keep any file locks -->
-         <sysproperty key="shutdown.embedded.jboss" value="true"/>
-
-         <classpath>
-            <path refid="junit.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.test.classes.dir}">
-               <include name="**/*TestCase.class"/>
-            </fileset>
-         </batchtest>
-      </junit>
-   </target>
-
-   <target name="all-tests" depends="ejbjar">
-
-      <mkdir dir="${build.reports}"/>
-      <junit printsummary="yes"
-             haltonerror="false"
-             haltonfailure="false"
-             fork="true">
-
-         <classpath>
-            <path refid="junit.classpath"/>
-         </classpath>
-
-         <formatter type="plain" usefile="true"/>
-         <formatter type="xml" usefile="true"/>
-
-         <test
-                 name="org.jboss.embedded.tutorial.AllTests"
-                 todir="${build.reports}"
-                 haltonerror="false"
-                 haltonfailure="false"
-                 fork="true"/>
-      </junit>
-   </target>
-
-
-   <target name="compile-stylesheets">
-      <mkdir dir="${build.stylesheets}"/>
-      <copy todir="${build.stylesheets}" filtering="yes">
-         <fileset dir="${src.stylesheets}">
-            <include name="**/*"/>
-         </fileset>
-      </copy>
-   </target>
-
-   <target name="tests-report-html" depends="compile-stylesheets">
-      <mkdir dir="${build.reports}/html"/>
-
-      <junitreport todir="${build.reports}">
-         <fileset dir="${build.reports}">
-            <include name="TEST-*.xml"/>
-         </fileset>
-         <report format="frames"
-                 todir="${build.reports}/html"
-                 styledir="${build.stylesheets}"
-                 />
-      </junitreport>
-   </target>
-
-   <target name="tests-report-clean">
-      <delete dir="${build.reports}"/>
-   </target>
-
-
-   <!-- =================================================================== -->
-   <!-- Cleans up generated stuff                                           -->
-   <!-- =================================================================== -->
-   <target name="clean">
-      <delete dir="${build.dir}"/>
-   </target>
-
-
-</project>
-
+<?xml version="1.0"?>
+
+<!-- ======================================================================= -->
+<!-- JBoss build file                                                       -->
+<!-- ======================================================================= -->
+
+<project name="JBoss" default="tests" basedir=".">
+   <property name="src.dir" value="${basedir}/src/main/java"/>
+   <property name="test.src.dir" value="${basedir}/src/test/java"/>
+   <property name="build.dir" value="${basedir}/build"/>
+   <property name="build.reports" value="${basedir}/build/reports"/>
+   <property name="build.stylesheets" value="${basedir}/build/stylesheets"/>
+   <property name="src.stylesheets" value="${basedir}/stylesheets"/>
+   <property name="build.classes.dir" value="${build.dir}/classes"/>
+   <property name="build.test.classes.dir" value="${build.dir}/test-classes"/>
+   <property name="lib.dir" value="../../../lib"/>
+   <property name="optional.lib.dir" value="../../../optional-lib"/>
+   <property name="conf.dir" value="../../../bootstrap"/>
+
+   <!-- =================================================================== -->
+   <!-- Prepares the build directory                                        -->
+   <!-- =================================================================== -->
+   <target name="prepare">
+      <mkdir dir="${build.dir}"/>
+      <mkdir dir="${build.classes.dir}"/>
+      <mkdir dir="${build.test.classes.dir}"/>
+      <!-- Build classpath -->
+      <path id="build.classpath">
+         <fileset dir="${lib.dir}">
+            <include name="*.jar"/>
+         </fileset>
+         <fileset dir="${optional.lib.dir}">
+            <include name="*.jar"/>
+         </fileset>
+         <pathelement location="${build.classes.dir}"/>
+      </path>
+
+      <path id="junit.classpath">
+         <pathelement location="${conf.dir}"/>
+         <pathelement location="${build.test.classes.dir}"/>
+         <fileset dir="${lib.dir}">
+            <include name="*.jar"/>
+         </fileset>
+         <fileset dir="${optional.lib.dir}">
+            <include name="*.jar"/>
+         </fileset>
+         <fileset dir="${build.dir}">
+            <include name="tutorial.jar"/>
+         </fileset>
+      </path>
+
+   </target>
+
+   <!-- =================================================================== -->
+   <!-- Compiles the source code                                            -->
+   <!-- =================================================================== -->
+   <target name="compile" depends="prepare">
+      <javac srcdir="${src.dir}"
+             destdir="${build.classes.dir}"
+             debug="on"
+             deprecation="on"
+             optimize="off"
+             includes="**">
+         <classpath refid="build.classpath"/>
+      </javac>
+      <javac srcdir="${test.src.dir}"
+             destdir="${build.test.classes.dir}"
+             debug="on"
+             deprecation="on"
+             optimize="off"
+             includes="**">
+         <classpath refid="build.classpath"/>
+      </javac>
+   </target>
+
+   <target name="ejbjar" depends="compile">
+      <jar jarfile="build/tutorial.jar">
+         <fileset dir="${build.classes.dir}">
+            <include name="**/beans/*.class"/>
+         </fileset>
+         <fileset dir="src/main/resources">
+            <include name="*.xml"/>
+            <include name="META-INF/persistence.xml"/>
+         </fileset>
+      </jar>
+   </target>
+
+   <target name="tests" depends="ejbjar">
+
+      <mkdir dir="${build.reports}"/>
+      <junit printsummary="yes"
+             haltonerror="false"
+             haltonfailure="false"
+             fork="true">
+
+         <!-- clean shutdown so we don't keep any file locks -->
+         <sysproperty key="shutdown.embedded.jboss" value="true"/>
+
+         <classpath>
+            <path refid="junit.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.test.classes.dir}">
+               <include name="**/*TestCase.class"/>
+            </fileset>
+         </batchtest>
+      </junit>
+   </target>
+
+   <target name="all-tests" depends="ejbjar">
+
+      <mkdir dir="${build.reports}"/>
+      <junit printsummary="yes"
+             haltonerror="false"
+             haltonfailure="false"
+             fork="true">
+
+         <classpath>
+            <path refid="junit.classpath"/>
+         </classpath>
+
+         <formatter type="plain" usefile="true"/>
+         <formatter type="xml" usefile="true"/>
+
+         <test
+                 name="org.jboss.embedded.tutorial.AllTests"
+                 todir="${build.reports}"
+                 haltonerror="false"
+                 haltonfailure="false"
+                 fork="true"/>
+      </junit>
+   </target>
+
+
+   <target name="compile-stylesheets">
+      <mkdir dir="${build.stylesheets}"/>
+      <copy todir="${build.stylesheets}" filtering="yes">
+         <fileset dir="${src.stylesheets}">
+            <include name="**/*"/>
+         </fileset>
+      </copy>
+   </target>
+
+   <target name="tests-report-html" depends="compile-stylesheets">
+      <mkdir dir="${build.reports}/html"/>
+
+      <junitreport todir="${build.reports}">
+         <fileset dir="${build.reports}">
+            <include name="TEST-*.xml"/>
+         </fileset>
+         <report format="frames"
+                 todir="${build.reports}/html"
+                 styledir="${build.stylesheets}"
+                 />
+      </junitreport>
+   </target>
+
+   <target name="tests-report-clean">
+      <delete dir="${build.reports}"/>
+   </target>
+
+
+   <!-- =================================================================== -->
+   <!-- Cleans up generated stuff                                           -->
+   <!-- =================================================================== -->
+   <target name="clean">
+      <delete dir="${build.dir}"/>
+   </target>
+
+
+</project>
+


Property changes on: trunk/embedded/docs/tutorial/junit/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/Customer.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/Customer.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/Customer.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,62 +1,62 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.junit.beans;
-
-import java.io.Serializable;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.GeneratedValue; import javax.persistence.GenerationType;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Entity
-public class Customer implements Serializable
-{
-   private int id;
-   private String name;
-
-   @Id @GeneratedValue(strategy=GenerationType.AUTO)
-   public int getId()
-   {
-      return id;
-   }
-
-   public void setId(int id)
-   {
-      this.id = id;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.junit.beans;
+
+import java.io.Serializable;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue; import javax.persistence.GenerationType;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Entity
+public class Customer implements Serializable
+{
+   private int id;
+   private String name;
+
+   @Id @GeneratedValue(strategy=GenerationType.AUTO)
+   public int getId()
+   {
+      return id;
+   }
+
+   public void setId(int id)
+   {
+      this.id = id;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+}


Property changes on: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/Customer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOBean.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,51 +1,51 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.junit.beans;
-
-import javax.ejb.Stateless;
-import javax.persistence.PersistenceContext;
-import javax.persistence.EntityManager;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Stateless
-public class CustomerDAOBean implements CustomerDAOLocal, CustomerDAORemote
-{
-   @PersistenceContext(unitName="custdb") private EntityManager em;
-
-   public int createCustomer(String name)
-   {
-      Customer cust = new Customer();
-      cust.setName(name);
-      em.persist(cust);
-      return cust.getId();
-   }
-
-   public Customer findCustomer(int id)
-   {
-      return em.find(Customer.class, id);
-   }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.junit.beans;
+
+import javax.ejb.Stateless;
+import javax.persistence.PersistenceContext;
+import javax.persistence.EntityManager;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Stateless
+public class CustomerDAOBean implements CustomerDAOLocal, CustomerDAORemote
+{
+   @PersistenceContext(unitName="custdb") private EntityManager em;
+
+   public int createCustomer(String name)
+   {
+      Customer cust = new Customer();
+      cust.setName(name);
+      em.persist(cust);
+      return cust.getId();
+   }
+
+   public Customer findCustomer(int id)
+   {
+      return em.find(Customer.class, id);
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOLocal.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOLocal.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOLocal.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.junit.beans;
-
-import javax.ejb.Local;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Local
-public interface CustomerDAOLocal
-{
-   int createCustomer(String name);
-
-   Customer findCustomer(int id);
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.junit.beans;
+
+import javax.ejb.Local;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Local
+public interface CustomerDAOLocal
+{
+   int createCustomer(String name);
+
+   Customer findCustomer(int id);
+}


Property changes on: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAOLocal.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAORemote.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAORemote.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAORemote.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.junit.beans;
-
-import javax.ejb.Remote;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Remote
-public interface CustomerDAORemote
-{
-   int createCustomer(String name);
-
-   Customer findCustomer(int id);
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.junit.beans;
+
+import javax.ejb.Remote;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Remote
+public interface CustomerDAORemote
+{
+   int createCustomer(String name);
+
+   Customer findCustomer(int id);
+}


Property changes on: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/CustomerDAORemote.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/ExampleMDB.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/ExampleMDB.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/ExampleMDB.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,49 +1,49 @@
-/*
- * 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.embedded.tutorial.junit.beans;
-
-import org.jboss.annotation.ejb.Depends;
-
-import javax.ejb.MessageDriven;
-import javax.ejb.ActivationConfigProperty;
-import javax.jms.MessageListener;
-import javax.jms.Message;
-
- at MessageDriven(activationConfig =
-{
-        @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
-        @ActivationConfigProperty(propertyName="destination", propertyValue="queue/example")
-})
- at Depends("jboss.mq.destination:name=example,service=Queue") // @Depends currently requires a canonical name for JMX beans
-public class ExampleMDB implements MessageListener
-{
-   public static boolean executed = false;
-
-   public void onMessage(Message recvMsg)
-   {
-      System.out.println("----------------");
-      System.out.println("Received message");
-      executed = true;
-      System.out.println("----------------");
-   }
-
-}
+/*
+ * 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.embedded.tutorial.junit.beans;
+
+import org.jboss.annotation.ejb.Depends;
+
+import javax.ejb.MessageDriven;
+import javax.ejb.ActivationConfigProperty;
+import javax.jms.MessageListener;
+import javax.jms.Message;
+
+ at MessageDriven(activationConfig =
+{
+        @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
+        @ActivationConfigProperty(propertyName="destination", propertyValue="queue/example")
+})
+ at Depends("jboss.mq.destination:name=example,service=Queue") // @Depends currently requires a canonical name for JMX beans
+public class ExampleMDB implements MessageListener
+{
+   public static boolean executed = false;
+
+   public void onMessage(Message recvMsg)
+   {
+      System.out.println("----------------");
+      System.out.println("Received message");
+      executed = true;
+      System.out.println("----------------");
+   }
+
+}


Property changes on: trunk/embedded/docs/tutorial/junit/src/main/java/org/jboss/embedded/tutorial/junit/beans/ExampleMDB.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/main/resources/META-INF/persistence.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/main/resources/META-INF/persistence.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence>
-   <persistence-unit name="custdb">
-      <jta-data-source>java:/DefaultDS</jta-data-source>
-      <properties>
-         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-         <property name="jboss.entity.manager.jndi.name" value="java:/EntityManagers/custdb"/>
-      </properties>
-   </persistence-unit>
-</persistence>
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence>
+   <persistence-unit name="custdb">
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <properties>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+         <property name="jboss.entity.manager.jndi.name" value="java:/EntityManagers/custdb"/>
+      </properties>
+   </persistence-unit>
+</persistence>


Property changes on: trunk/embedded/docs/tutorial/junit/src/main/resources/META-INF/persistence.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/main/resources/queue-service.xml
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/main/resources/queue-service.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/main/resources/queue-service.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,7 +1,7 @@
-<server>
-   <mbean code="org.jboss.mq.server.jmx.Queue"
-      name="jboss.mq.destination:service=Queue,name=example">
-      <attribute name="JNDIName">queue/example</attribute>
-      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-   </mbean>
+<server>
+   <mbean code="org.jboss.mq.server.jmx.Queue"
+      name="jboss.mq.destination:service=Queue,name=example">
+      <attribute name="JNDIName">queue/example</attribute>
+      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+   </mbean>
 </server>
\ No newline at end of file


Property changes on: trunk/embedded/docs/tutorial/junit/src/main/resources/queue-service.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/main/resources/tutorial-persistence.xml
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/main/resources/tutorial-persistence.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/main/resources/tutorial-persistence.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence>
-   <persistence-unit name="custdb">
-      <jta-data-source>java:/DefaultDS</jta-data-source>
-      <properties>
-         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-         <property name="jboss.entity.manager.jndi.name" value="java:/EntityManagers/custdb"/>
-      </properties>
-   </persistence-unit>
-</persistence>
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence>
+   <persistence-unit name="custdb">
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <properties>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+         <property name="jboss.entity.manager.jndi.name" value="java:/EntityManagers/custdb"/>
+      </properties>
+   </persistence-unit>
+</persistence>


Property changes on: trunk/embedded/docs/tutorial/junit/src/main/resources/tutorial-persistence.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/AllTests.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/AllTests.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/AllTests.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,74 +1,74 @@
-/*
- * 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.embedded.tutorial;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.tutorial.junit.EasierEjbTestCase;
-import org.jboss.embedded.tutorial.junit.EjbTestCase;
-import org.jboss.embedded.tutorial.junit.JarByResourceTestCase;
-import org.jboss.embedded.tutorial.junit.MdbTestCase;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class AllTests extends TestSuite
-{
-   public static void main(String[] args)
-   {
-      TestRunner.run(suite());
-   }
-
-   public static Test suite()
-   {
-      TestSuite suite = new TestSuite("All Tests");
-
-      suite.addTest(EasierEjbTestCase.suite());
-      suite.addTest(EjbTestCase.suite());
-      suite.addTest(JarByResourceTestCase.suite());
-      suite.addTest(MdbTestCase.suite());
-
-      return new TestSetup(suite)
-      {
-         @Override
-         protected void setUp() throws Exception
-         {
-            Bootstrap.getInstance().bootstrap();
-            super.setUp();
-         }
-
-         @Override
-         protected void tearDown() throws Exception
-         {
-            Bootstrap.getInstance().shutdown();
-            super.tearDown();
-         }
-      };
-
-   }
+/*
+ * 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.embedded.tutorial;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.tutorial.junit.EasierEjbTestCase;
+import org.jboss.embedded.tutorial.junit.EjbTestCase;
+import org.jboss.embedded.tutorial.junit.JarByResourceTestCase;
+import org.jboss.embedded.tutorial.junit.MdbTestCase;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class AllTests extends TestSuite
+{
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("All Tests");
+
+      suite.addTest(EasierEjbTestCase.suite());
+      suite.addTest(EjbTestCase.suite());
+      suite.addTest(JarByResourceTestCase.suite());
+      suite.addTest(MdbTestCase.suite());
+
+      return new TestSetup(suite)
+      {
+         @Override
+         protected void setUp() throws Exception
+         {
+            Bootstrap.getInstance().bootstrap();
+            super.setUp();
+         }
+
+         @Override
+         protected void tearDown() throws Exception
+         {
+            Bootstrap.getInstance().shutdown();
+            super.tearDown();
+         }
+      };
+
+   }
 }
\ No newline at end of file


Property changes on: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/AllTests.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EasierEjbTestCase.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EasierEjbTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EasierEjbTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,140 +1,140 @@
-/*
- * 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.embedded.tutorial.junit;
-
-import junit.framework.Test;
-import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
-import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
-import org.jboss.embedded.junit.BaseTestCase;
-import org.jboss.embedded.tutorial.junit.beans.Customer;
-import org.jboss.embedded.tutorial.junit.beans.CustomerDAOBean;
-import org.jboss.embedded.tutorial.junit.beans.CustomerDAOLocal;
-import org.jboss.embedded.tutorial.junit.beans.CustomerDAORemote;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.deployers.spi.DeploymentException;
-
-import javax.naming.InitialContext;
-import javax.persistence.EntityManager;
-import javax.transaction.TransactionManager;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
-public class EasierEjbTestCase extends BaseTestCase
-{
-   public EasierEjbTestCase()
-   {
-      super("EjbTestCase");
-   }
-
-   private static AssembledDirectory jar;
-
-   public static void deploy()
-   {
-      jar = AssembledContextFactory.getInstance().create("ejbTestCase.jar");
-      jar.addClass(Customer.class);
-      jar.addClass(CustomerDAOBean.class);
-      jar.addClass(CustomerDAOLocal.class);
-      jar.addClass(CustomerDAORemote.class);
-      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");
-      try
-      {
-         Bootstrap.getInstance().deploy(jar);
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Unable to deploy", e);
-      }
-   }
-
-   public static void undeploy()
-   {
-      try
-      {
-         Bootstrap.getInstance().undeploy(jar);
-         AssembledContextFactory.getInstance().remove(jar);
-         jar = null;
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Unable to undeploy", e);
-      }
-   }
-
-
-
-   public static Test suite()
-   {
-      return preProcessedTest(EasierEjbTestCase.class);
-   }
-
-   public void testEJBs() throws Exception
-   {
-      InitialContext ctx = new InitialContext();
-      CustomerDAOLocal local = (CustomerDAOLocal) ctx.lookup("CustomerDAOBean/local");
-      CustomerDAORemote remote = (CustomerDAORemote) ctx.lookup("CustomerDAOBean/remote");
-
-      int id = local.createCustomer("Gavin");
-      Customer cust = local.findCustomer(id);
-      assertNotNull(cust);
-      System.out.println("Successfully created and found Gavin from @Local interface");
-
-      id = remote.createCustomer("Emmanuel");
-      cust = remote.findCustomer(id);
-      assertNotNull(cust);
-      System.out.println("Successfully created and found Emmanuel from @Remote interface");
-   }
-
-   public void testEntityManager() throws Exception
-   {
-      // This is a transactionally aware EntityManager and must be accessed within a JTA transaction
-      // Why aren't we using javax.persistence.Persistence?  Well, our persistence.xml file uses
-      // jta-datasource which means that it is created by the EJB container/embedded JBoss.
-      // using javax.persistence.Persistence will just cause us an error
-      EntityManager em = (EntityManager) new InitialContext().lookup("java:/EntityManagers/custdb");
-
-      // Obtain JBoss transaction
-      TransactionManager tm = (TransactionManager) new InitialContext().lookup("java:/TransactionManager");
-
-      tm.begin();
-
-      Customer cust = new Customer();
-      cust.setName("Bill");
-      em.persist(cust);
-
-      assertTrue(cust.getId() > 0);
-
-      int id = cust.getId();
-
-      System.out.println("created bill in DB with id: " + id);
-
-      tm.commit();
-
-      tm.begin();
-      cust = em.find(Customer.class, id);
-      assertNotNull(cust);
-      tm.commit();
-   }
-}
+/*
+ * 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.embedded.tutorial.junit;
+
+import junit.framework.Test;
+import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
+import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
+import org.jboss.embedded.junit.BaseTestCase;
+import org.jboss.embedded.tutorial.junit.beans.Customer;
+import org.jboss.embedded.tutorial.junit.beans.CustomerDAOBean;
+import org.jboss.embedded.tutorial.junit.beans.CustomerDAOLocal;
+import org.jboss.embedded.tutorial.junit.beans.CustomerDAORemote;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.deployers.spi.DeploymentException;
+
+import javax.naming.InitialContext;
+import javax.persistence.EntityManager;
+import javax.transaction.TransactionManager;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+public class EasierEjbTestCase extends BaseTestCase
+{
+   public EasierEjbTestCase()
+   {
+      super("EjbTestCase");
+   }
+
+   private static AssembledDirectory jar;
+
+   public static void deploy()
+   {
+      jar = AssembledContextFactory.getInstance().create("ejbTestCase.jar");
+      jar.addClass(Customer.class);
+      jar.addClass(CustomerDAOBean.class);
+      jar.addClass(CustomerDAOLocal.class);
+      jar.addClass(CustomerDAORemote.class);
+      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");
+      try
+      {
+         Bootstrap.getInstance().deploy(jar);
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Unable to deploy", e);
+      }
+   }
+
+   public static void undeploy()
+   {
+      try
+      {
+         Bootstrap.getInstance().undeploy(jar);
+         AssembledContextFactory.getInstance().remove(jar);
+         jar = null;
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Unable to undeploy", e);
+      }
+   }
+
+
+
+   public static Test suite()
+   {
+      return preProcessedTest(EasierEjbTestCase.class);
+   }
+
+   public void testEJBs() throws Exception
+   {
+      InitialContext ctx = new InitialContext();
+      CustomerDAOLocal local = (CustomerDAOLocal) ctx.lookup("CustomerDAOBean/local");
+      CustomerDAORemote remote = (CustomerDAORemote) ctx.lookup("CustomerDAOBean/remote");
+
+      int id = local.createCustomer("Gavin");
+      Customer cust = local.findCustomer(id);
+      assertNotNull(cust);
+      System.out.println("Successfully created and found Gavin from @Local interface");
+
+      id = remote.createCustomer("Emmanuel");
+      cust = remote.findCustomer(id);
+      assertNotNull(cust);
+      System.out.println("Successfully created and found Emmanuel from @Remote interface");
+   }
+
+   public void testEntityManager() throws Exception
+   {
+      // This is a transactionally aware EntityManager and must be accessed within a JTA transaction
+      // Why aren't we using javax.persistence.Persistence?  Well, our persistence.xml file uses
+      // jta-datasource which means that it is created by the EJB container/embedded JBoss.
+      // using javax.persistence.Persistence will just cause us an error
+      EntityManager em = (EntityManager) new InitialContext().lookup("java:/EntityManagers/custdb");
+
+      // Obtain JBoss transaction
+      TransactionManager tm = (TransactionManager) new InitialContext().lookup("java:/TransactionManager");
+
+      tm.begin();
+
+      Customer cust = new Customer();
+      cust.setName("Bill");
+      em.persist(cust);
+
+      assertTrue(cust.getId() > 0);
+
+      int id = cust.getId();
+
+      System.out.println("created bill in DB with id: " + id);
+
+      tm.commit();
+
+      tm.begin();
+      cust = em.find(Customer.class, id);
+      assertNotNull(cust);
+      tm.commit();
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EasierEjbTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EjbTestCase.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EjbTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EjbTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,186 +1,186 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.junit;
-
-import javax.naming.InitialContext;
-import javax.persistence.EntityManager;
-import javax.transaction.TransactionManager;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.framework.Test;
-import junit.extensions.TestSetup;
-import org.jboss.embedded.tutorial.junit.beans.CustomerDAORemote;
-import org.jboss.embedded.tutorial.junit.beans.CustomerDAOLocal;
-import org.jboss.embedded.tutorial.junit.beans.Customer;
-import org.jboss.embedded.tutorial.junit.beans.CustomerDAOBean;
-import org.jboss.embedded.junit.EmbeddedTestSetup;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
-import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
-public class EjbTestCase extends TestCase
-{
-   public EjbTestCase()
-   {
-      super("EjbTestCase");
-   }
-
-   private static AssembledDirectory jar;
-   private static boolean globalSetup = false;
-
-   private static void deploy()
-   {
-      jar = AssembledContextFactory.getInstance().create("ejbTestCase.jar");
-      jar.addClass(Customer.class);
-      jar.addClass(CustomerDAOBean.class);
-      jar.addClass(CustomerDAOLocal.class);
-      jar.addClass(CustomerDAORemote.class);
-      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");
-      try
-      {
-         Bootstrap.getInstance().deploy(jar);
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Unable to deploy", e);
-      }
-   }
-
-   private static void undeploy()
-   {
-      try
-      {
-         Bootstrap.getInstance().undeploy(jar);
-         AssembledContextFactory.getInstance().remove(jar);
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Unable to undeploy", e);
-      }
-   }
-
-   
-
-   public static Test suite()
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(EjbTestCase.class);
-      globalSetup = true;
-
-      return new TestSetup(suite)
-      {
-         @Override
-         protected void setUp() throws Exception
-         {
-            super.setUp();
-            if (!Bootstrap.getInstance().isStarted())
-            {
-               Bootstrap.getInstance().bootstrap();
-            }
-            deploy();
-         }
-
-         @Override
-         protected void tearDown() throws Exception
-         {
-            undeploy();
-            if (System.getProperty("shutdown.embedded.jboss") != null) Bootstrap.getInstance().shutdown();
-            super.tearDown();
-         }
-      };
-   }
-
-
-
-
-   @Override
-   protected void setUp() throws Exception
-   {
-      if (globalSetup) return;
-      Bootstrap.getInstance().bootstrap();
-      deploy();
-   }
-
-   @Override
-   protected void tearDown() throws Exception
-   {
-      if (globalSetup) return;
-      undeploy();
-   }
-
-
-   public void testEJBs() throws Exception
-   {
-      InitialContext ctx = new InitialContext();
-      CustomerDAOLocal local = (CustomerDAOLocal) ctx.lookup("CustomerDAOBean/local");
-      CustomerDAORemote remote = (CustomerDAORemote) ctx.lookup("CustomerDAOBean/remote");
-
-      int id = local.createCustomer("Gavin");
-      Customer cust = local.findCustomer(id);
-      assertNotNull(cust);
-      System.out.println("Successfully created and found Gavin from @Local interface");
-
-      id = remote.createCustomer("Emmanuel");
-      cust = remote.findCustomer(id);
-      assertNotNull(cust);
-      System.out.println("Successfully created and found Emmanuel from @Remote interface");
-   }
-
-   public void testEntityManager() throws Exception
-   {
-      // This is a transactionally aware EntityManager and must be accessed within a JTA transaction
-      // Why aren't we using javax.persistence.Persistence?  Well, our persistence.xml file uses
-      // jta-datasource which means that it is created by the EJB container/embedded JBoss.
-      // using javax.persistence.Persistence will just cause us an error
-      EntityManager em = (EntityManager) new InitialContext().lookup("java:/EntityManagers/custdb");
-
-      // Obtain JBoss transaction
-      TransactionManager tm = (TransactionManager) new InitialContext().lookup("java:/TransactionManager");
-
-      tm.begin();
-
-      Customer cust = new Customer();
-      cust.setName("Bill");
-      em.persist(cust);
-
-      assertTrue(cust.getId() > 0);
-
-      int id = cust.getId();
-
-      System.out.println("created bill in DB with id: " + id);
-
-      tm.commit();
-
-      tm.begin();
-      cust = em.find(Customer.class, id);
-      assertNotNull(cust);
-      tm.commit();
-   }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.junit;
+
+import javax.naming.InitialContext;
+import javax.persistence.EntityManager;
+import javax.transaction.TransactionManager;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import junit.framework.Test;
+import junit.extensions.TestSetup;
+import org.jboss.embedded.tutorial.junit.beans.CustomerDAORemote;
+import org.jboss.embedded.tutorial.junit.beans.CustomerDAOLocal;
+import org.jboss.embedded.tutorial.junit.beans.Customer;
+import org.jboss.embedded.tutorial.junit.beans.CustomerDAOBean;
+import org.jboss.embedded.junit.EmbeddedTestSetup;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
+import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+public class EjbTestCase extends TestCase
+{
+   public EjbTestCase()
+   {
+      super("EjbTestCase");
+   }
+
+   private static AssembledDirectory jar;
+   private static boolean globalSetup = false;
+
+   private static void deploy()
+   {
+      jar = AssembledContextFactory.getInstance().create("ejbTestCase.jar");
+      jar.addClass(Customer.class);
+      jar.addClass(CustomerDAOBean.class);
+      jar.addClass(CustomerDAOLocal.class);
+      jar.addClass(CustomerDAORemote.class);
+      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");
+      try
+      {
+         Bootstrap.getInstance().deploy(jar);
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Unable to deploy", e);
+      }
+   }
+
+   private static void undeploy()
+   {
+      try
+      {
+         Bootstrap.getInstance().undeploy(jar);
+         AssembledContextFactory.getInstance().remove(jar);
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Unable to undeploy", e);
+      }
+   }
+
+   
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(EjbTestCase.class);
+      globalSetup = true;
+
+      return new TestSetup(suite)
+      {
+         @Override
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            if (!Bootstrap.getInstance().isStarted())
+            {
+               Bootstrap.getInstance().bootstrap();
+            }
+            deploy();
+         }
+
+         @Override
+         protected void tearDown() throws Exception
+         {
+            undeploy();
+            if (System.getProperty("shutdown.embedded.jboss") != null) Bootstrap.getInstance().shutdown();
+            super.tearDown();
+         }
+      };
+   }
+
+
+
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      if (globalSetup) return;
+      Bootstrap.getInstance().bootstrap();
+      deploy();
+   }
+
+   @Override
+   protected void tearDown() throws Exception
+   {
+      if (globalSetup) return;
+      undeploy();
+   }
+
+
+   public void testEJBs() throws Exception
+   {
+      InitialContext ctx = new InitialContext();
+      CustomerDAOLocal local = (CustomerDAOLocal) ctx.lookup("CustomerDAOBean/local");
+      CustomerDAORemote remote = (CustomerDAORemote) ctx.lookup("CustomerDAOBean/remote");
+
+      int id = local.createCustomer("Gavin");
+      Customer cust = local.findCustomer(id);
+      assertNotNull(cust);
+      System.out.println("Successfully created and found Gavin from @Local interface");
+
+      id = remote.createCustomer("Emmanuel");
+      cust = remote.findCustomer(id);
+      assertNotNull(cust);
+      System.out.println("Successfully created and found Emmanuel from @Remote interface");
+   }
+
+   public void testEntityManager() throws Exception
+   {
+      // This is a transactionally aware EntityManager and must be accessed within a JTA transaction
+      // Why aren't we using javax.persistence.Persistence?  Well, our persistence.xml file uses
+      // jta-datasource which means that it is created by the EJB container/embedded JBoss.
+      // using javax.persistence.Persistence will just cause us an error
+      EntityManager em = (EntityManager) new InitialContext().lookup("java:/EntityManagers/custdb");
+
+      // Obtain JBoss transaction
+      TransactionManager tm = (TransactionManager) new InitialContext().lookup("java:/TransactionManager");
+
+      tm.begin();
+
+      Customer cust = new Customer();
+      cust.setName("Bill");
+      em.persist(cust);
+
+      assertTrue(cust.getId() > 0);
+
+      int id = cust.getId();
+
+      System.out.println("created bill in DB with id: " + id);
+
+      tm.commit();
+
+      tm.begin();
+      cust = em.find(Customer.class, id);
+      assertNotNull(cust);
+      tm.commit();
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/EjbTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/JarByResourceTestCase.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/JarByResourceTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/JarByResourceTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,101 +1,101 @@
-/*
- * 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.embedded.tutorial.junit;
-
-import org.jboss.embedded.junit.BaseTestCase;
-import org.jboss.embedded.tutorial.junit.beans.ExampleMDB;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.deployers.spi.DeploymentException;
-import junit.framework.Test;
-
-import javax.naming.InitialContext;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.Connection;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.MessageProducer;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
-public class JarByResourceTestCase extends BaseTestCase
-{
-   public JarByResourceTestCase()
-   {
-      super("MdbTestCase");
-   }
-
-   public static void deploy()
-   {
-      try
-      {
-         Bootstrap.getInstance().deployResourceBase(ExampleMDB.class);
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Unable to deploy", e);
-      }
-   }
-
-   public static void undeploy()
-   {
-      try
-      {
-         Bootstrap.getInstance().undeployResourceBase(ExampleMDB.class);
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Unable to undeploy", e);
-      }
-   }
-
-
-
-   public static Test suite()
-   {
-      return preProcessedTest(JarByResourceTestCase.class);
-   }
-
-   public void testMDB() throws Exception
-   {
-      ExampleMDB.executed = false;
-
-      InitialContext ctx = new InitialContext();
-      ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
-      Destination destination = (Destination) ctx.lookup("queue/example");
-      assertNotNull(destination);
-      Connection conn = factory.createConnection();
-      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      TextMessage message = session.createTextMessage("hello");
-      MessageProducer producer = session.createProducer(destination);
-      producer.send(message);
-      session.close();
-      conn.close();
-      // wait a second just to make sure message was delivered.
-      Thread.sleep(1000);
-      assertTrue(ExampleMDB.executed);
-   }
-}
+/*
+ * 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.embedded.tutorial.junit;
+
+import org.jboss.embedded.junit.BaseTestCase;
+import org.jboss.embedded.tutorial.junit.beans.ExampleMDB;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.deployers.spi.DeploymentException;
+import junit.framework.Test;
+
+import javax.naming.InitialContext;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.Connection;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.MessageProducer;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+public class JarByResourceTestCase extends BaseTestCase
+{
+   public JarByResourceTestCase()
+   {
+      super("MdbTestCase");
+   }
+
+   public static void deploy()
+   {
+      try
+      {
+         Bootstrap.getInstance().deployResourceBase(ExampleMDB.class);
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Unable to deploy", e);
+      }
+   }
+
+   public static void undeploy()
+   {
+      try
+      {
+         Bootstrap.getInstance().undeployResourceBase(ExampleMDB.class);
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Unable to undeploy", e);
+      }
+   }
+
+
+
+   public static Test suite()
+   {
+      return preProcessedTest(JarByResourceTestCase.class);
+   }
+
+   public void testMDB() throws Exception
+   {
+      ExampleMDB.executed = false;
+
+      InitialContext ctx = new InitialContext();
+      ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
+      Destination destination = (Destination) ctx.lookup("queue/example");
+      assertNotNull(destination);
+      Connection conn = factory.createConnection();
+      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+      TextMessage message = session.createTextMessage("hello");
+      MessageProducer producer = session.createProducer(destination);
+      producer.send(message);
+      session.close();
+      conn.close();
+      // wait a second just to make sure message was delivered.
+      Thread.sleep(1000);
+      assertTrue(ExampleMDB.executed);
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/JarByResourceTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/MdbTestCase.java
===================================================================
--- trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/MdbTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/MdbTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,110 +1,110 @@
-/*
- * 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.embedded.tutorial.junit;
-
-import junit.framework.Test;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.junit.BaseTestCase;
-import org.jboss.embedded.tutorial.junit.beans.ExampleMDB;
-import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
-import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
-public class MdbTestCase extends BaseTestCase
-{
-   public MdbTestCase()
-   {
-      super("MdbTestCase");
-   }
-
-   private static AssembledDirectory jar;
-
-   public static void deploy()
-   {
-      jar = AssembledContextFactory.getInstance().create("ejbTestCase.jar");
-      jar.addClass(ExampleMDB.class);
-      jar.addResource("queue-service.xml");
-      try
-      {
-         Bootstrap.getInstance().deploy(jar);
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Unable to deploy", e);
-      }
-   }
-
-   public static void undeploy()
-   {
-      try
-      {
-         Bootstrap.getInstance().undeploy(jar);
-         AssembledContextFactory.getInstance().remove(jar);
-         jar = null;
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Unable to undeploy", e);
-      }
-   }
-
-
-
-   public static Test suite()
-   {
-      return preProcessedTest(MdbTestCase.class);
-   }
-
-   public void testMDB() throws Exception
-   {
-      ExampleMDB.executed = false;
-
-      InitialContext ctx = new InitialContext();
-      ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
-      Destination destination = (Destination) ctx.lookup("queue/example");
-      assertNotNull(destination);
-      Connection conn = factory.createConnection();
-      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      TextMessage message = session.createTextMessage("hello");
-      MessageProducer producer = session.createProducer(destination);
-      producer.send(message);
-      session.close();
-      conn.close();
-      // wait a second just to make sure message was delivered.
-      Thread.sleep(1000);
-      assertTrue(ExampleMDB.executed);
-   }
-}
+/*
+ * 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.embedded.tutorial.junit;
+
+import junit.framework.Test;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.junit.BaseTestCase;
+import org.jboss.embedded.tutorial.junit.beans.ExampleMDB;
+import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
+import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+public class MdbTestCase extends BaseTestCase
+{
+   public MdbTestCase()
+   {
+      super("MdbTestCase");
+   }
+
+   private static AssembledDirectory jar;
+
+   public static void deploy()
+   {
+      jar = AssembledContextFactory.getInstance().create("ejbTestCase.jar");
+      jar.addClass(ExampleMDB.class);
+      jar.addResource("queue-service.xml");
+      try
+      {
+         Bootstrap.getInstance().deploy(jar);
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Unable to deploy", e);
+      }
+   }
+
+   public static void undeploy()
+   {
+      try
+      {
+         Bootstrap.getInstance().undeploy(jar);
+         AssembledContextFactory.getInstance().remove(jar);
+         jar = null;
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Unable to undeploy", e);
+      }
+   }
+
+
+
+   public static Test suite()
+   {
+      return preProcessedTest(MdbTestCase.class);
+   }
+
+   public void testMDB() throws Exception
+   {
+      ExampleMDB.executed = false;
+
+      InitialContext ctx = new InitialContext();
+      ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
+      Destination destination = (Destination) ctx.lookup("queue/example");
+      assertNotNull(destination);
+      Connection conn = factory.createConnection();
+      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+      TextMessage message = session.createTextMessage("hello");
+      MessageProducer producer = session.createProducer(destination);
+      producer.send(message);
+      session.close();
+      conn.close();
+      // wait a second just to make sure message was delivered.
+      Thread.sleep(1000);
+      assertTrue(ExampleMDB.executed);
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/junit/src/test/java/org/jboss/embedded/tutorial/junit/MdbTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/README.html
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/README.html	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/README.html	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,18 +1,18 @@
-<html>
-<body>
-<p>
-<h2> Using Embedded JBoss</h2>
-
-</p><p>
-This project is built using Ant and the build.xml file included in the tomcat directory.  There are a number ways to deploy things in Embedded JBoss.  There are different Ant tasks and Java files that represent some of those different ways:
-</p><p>
-<ul>
-<li> <i>run.classpath.deploy</i> target runs the <a href="src/org/jboss/embedded/tutorial/javase/ClasspathDeploy.java">ClasspathDeploy</a> class.  This class uses Bootstrap.scanClasspath() method to deploy the example EJBs and persistence units.</li>
-<li> <i>run.jar</i> target runs the <a href="src/org/jboss/embedded/tutorial/javase/DeployJarFromResourceBase.java">DeployJarFromResourceBase</a> class. This class uses the Bootstrap.deployBaseResource method to deploy the example EJBs.</li>
-<li> <i>run.virtual</i> target runs the <a href="src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy.java">VirtualArchiveDeploy</a> class.  This class uses the VFS to create a virtual archive that you can deploy.</li>
-<li> <i>run.virtual2</i> target runs the <a href="src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy2.java">VirtualArchiveDeploy2</a> class.  This class shows a different way of using the VFS to create a virtual archive that you can deploy.</li>
-</ul>
-</p><p>
-</p>
-</body>
-</html>
+<html>
+<body>
+<p>
+<h2> Using Embedded JBoss</h2>
+
+</p><p>
+This project is built using Ant and the build.xml file included in the tomcat directory.  There are a number ways to deploy things in Embedded JBoss.  There are different Ant tasks and Java files that represent some of those different ways:
+</p><p>
+<ul>
+<li> <i>run.classpath.deploy</i> target runs the <a href="src/org/jboss/embedded/tutorial/javase/ClasspathDeploy.java">ClasspathDeploy</a> class.  This class uses Bootstrap.scanClasspath() method to deploy the example EJBs and persistence units.</li>
+<li> <i>run.jar</i> target runs the <a href="src/org/jboss/embedded/tutorial/javase/DeployJarFromResourceBase.java">DeployJarFromResourceBase</a> class. This class uses the Bootstrap.deployBaseResource method to deploy the example EJBs.</li>
+<li> <i>run.virtual</i> target runs the <a href="src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy.java">VirtualArchiveDeploy</a> class.  This class uses the VFS to create a virtual archive that you can deploy.</li>
+<li> <i>run.virtual2</i> target runs the <a href="src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy2.java">VirtualArchiveDeploy2</a> class.  This class shows a different way of using the VFS to create a virtual archive that you can deploy.</li>
+</ul>
+</p><p>
+</p>
+</body>
+</html>


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/README.html
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/resources/META-INF/persistence.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/resources/tutorial-persistence.xml
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/resources/tutorial-persistence.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/resources/tutorial-persistence.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence>
-   <persistence-unit name="custdb">
-      <jta-data-source>java:/DefaultDS</jta-data-source>
-      <properties>
-         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-      </properties>
-   </persistence-unit>
-</persistence>
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence>
+   <persistence-unit name="custdb">
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <properties>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+   </persistence-unit>
+</persistence>


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/resources/tutorial-persistence.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/ClasspathDeploy.java
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/ClasspathDeploy.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/ClasspathDeploy.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,43 +1,43 @@
-/*
- * 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.embedded.tutorial.javase;
-
-import org.jboss.embedded.Bootstrap;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class ClasspathDeploy extends Main
-{
-   public static void main(String[] args) throws Exception
-   {
-      Bootstrap.getInstance().bootstrap();
-      Bootstrap.getInstance().scanClasspath("tutorial.jar");
-
-      run();
-
-      Bootstrap.getInstance().shutdown();
-   }
-}
+/*
+ * 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.embedded.tutorial.javase;
+
+import org.jboss.embedded.Bootstrap;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClasspathDeploy extends Main
+{
+   public static void main(String[] args) throws Exception
+   {
+      Bootstrap.getInstance().bootstrap();
+      Bootstrap.getInstance().scanClasspath("tutorial.jar");
+
+      run();
+
+      Bootstrap.getInstance().shutdown();
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/ClasspathDeploy.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/DeployJarFromResourceBase.java
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/DeployJarFromResourceBase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/DeployJarFromResourceBase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,46 +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.embedded.tutorial.javase;
-
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.DeploymentGroup;
-
-/**
- * Find a jar to deploy by providing a resource it is located in
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class DeployJarFromResourceBase extends Main
-{
-   public static void main(String[] args) throws Exception
-   {
-      Bootstrap.getInstance().bootstrap();
-
-      String resource = "META-INF/persistence.xml";
-      Bootstrap.getInstance().deployResourceBase(resource);
-
-      run();
-
-      Bootstrap.getInstance().shutdown();
-   }
-}
+/*
+ * 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.embedded.tutorial.javase;
+
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.DeploymentGroup;
+
+/**
+ * Find a jar to deploy by providing a resource it is located in
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class DeployJarFromResourceBase extends Main
+{
+   public static void main(String[] args) throws Exception
+   {
+      Bootstrap.getInstance().bootstrap();
+
+      String resource = "META-INF/persistence.xml";
+      Bootstrap.getInstance().deployResourceBase(resource);
+
+      run();
+
+      Bootstrap.getInstance().shutdown();
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/DeployJarFromResourceBase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/Main.java
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/Main.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/Main.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,55 +1,55 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.javase;
-
-import org.jboss.embedded.tutorial.javase.beans.CustomerDAORemote;
-import org.jboss.embedded.tutorial.javase.beans.Customer;
-import org.jboss.embedded.tutorial.javase.beans.CustomerDAOLocal;
-
-import java.util.Hashtable;
-import javax.naming.InitialContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
-public class Main
-{
-   public static void run() throws Exception
-   {
-      InitialContext ctx = new InitialContext();
-      CustomerDAOLocal local = (CustomerDAOLocal)ctx.lookup("CustomerDAOBean/local");
-      CustomerDAORemote remote = (CustomerDAORemote)ctx.lookup("CustomerDAOBean/remote");
-
-      System.out.println("----------------------------------------------------------");
-      int id = local.createCustomer("Gavin");
-      Customer cust = local.findCustomer(id);
-      System.out.println("    Successfully created and found Gavin from @Local interface");
-
-      id = remote.createCustomer("Emmanuel");
-      cust = remote.findCustomer(id);
-      System.out.println("    Successfully created and found Emmanuel from @Remote interface");
-      System.out.println("----------------------------------------------------------");
-   }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.javase;
+
+import org.jboss.embedded.tutorial.javase.beans.CustomerDAORemote;
+import org.jboss.embedded.tutorial.javase.beans.Customer;
+import org.jboss.embedded.tutorial.javase.beans.CustomerDAOLocal;
+
+import java.util.Hashtable;
+import javax.naming.InitialContext;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+public class Main
+{
+   public static void run() throws Exception
+   {
+      InitialContext ctx = new InitialContext();
+      CustomerDAOLocal local = (CustomerDAOLocal)ctx.lookup("CustomerDAOBean/local");
+      CustomerDAORemote remote = (CustomerDAORemote)ctx.lookup("CustomerDAOBean/remote");
+
+      System.out.println("----------------------------------------------------------");
+      int id = local.createCustomer("Gavin");
+      Customer cust = local.findCustomer(id);
+      System.out.println("    Successfully created and found Gavin from @Local interface");
+
+      id = remote.createCustomer("Emmanuel");
+      cust = remote.findCustomer(id);
+      System.out.println("    Successfully created and found Emmanuel from @Remote interface");
+      System.out.println("----------------------------------------------------------");
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/Main.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy.java
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,57 +1,57 @@
-/*
- * 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.embedded.tutorial.javase;
-
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.tutorial.javase.beans.Customer;
-import org.jboss.embedded.tutorial.javase.beans.CustomerDAOBean;
-import org.jboss.embedded.tutorial.javase.beans.CustomerDAOLocal;
-import org.jboss.embedded.tutorial.javase.beans.CustomerDAORemote;
-import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
-import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class VirtualArchiveDeploy extends Main
-{
-   public static void main(String[] args) throws Exception
-   {
-      AssembledDirectory jar = AssembledContextFactory.getInstance().create("tutorial.jar");
-      jar.addClass(Customer.class);
-      jar.addClass(CustomerDAOBean.class);
-      jar.addClass(CustomerDAOLocal.class);
-      jar.addClass(CustomerDAORemote.class);
-      // Get tutorial-persistence.xml from classloader and alias it within the archive.
-      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");
-
-      Bootstrap.getInstance().bootstrap();
-      Bootstrap.getInstance().deploy(jar);
-
-      run();
-
-      Bootstrap.getInstance().shutdown();
-   }
-}
+/*
+ * 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.embedded.tutorial.javase;
+
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.tutorial.javase.beans.Customer;
+import org.jboss.embedded.tutorial.javase.beans.CustomerDAOBean;
+import org.jboss.embedded.tutorial.javase.beans.CustomerDAOLocal;
+import org.jboss.embedded.tutorial.javase.beans.CustomerDAORemote;
+import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
+import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class VirtualArchiveDeploy extends Main
+{
+   public static void main(String[] args) throws Exception
+   {
+      AssembledDirectory jar = AssembledContextFactory.getInstance().create("tutorial.jar");
+      jar.addClass(Customer.class);
+      jar.addClass(CustomerDAOBean.class);
+      jar.addClass(CustomerDAOLocal.class);
+      jar.addClass(CustomerDAORemote.class);
+      // Get tutorial-persistence.xml from classloader and alias it within the archive.
+      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");
+
+      Bootstrap.getInstance().bootstrap();
+      Bootstrap.getInstance().deploy(jar);
+
+      run();
+
+      Bootstrap.getInstance().shutdown();
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy2.java
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy2.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy2.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,55 +1,55 @@
-/*
- * 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.embedded.tutorial.javase;
-
-import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
-import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
-import org.jboss.embedded.tutorial.javase.beans.Customer;
-import org.jboss.embedded.tutorial.javase.beans.CustomerDAOBean;
-import org.jboss.embedded.tutorial.javase.beans.CustomerDAOLocal;
-import org.jboss.embedded.tutorial.javase.beans.CustomerDAORemote;
-import org.jboss.embedded.Bootstrap;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class VirtualArchiveDeploy2 extends Main
-{
-   public static void main(String[] args) throws Exception
-   {
-      AssembledDirectory jar = AssembledContextFactory.getInstance().create("tutorial.jar");
-      String[] includes = {"**/beans/*.class"};
-      jar.addResources(Customer.class, includes, null);
-      // Get tutorial-persistence.xml from classloader and alias it within the archive.
-      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");
-
-      Bootstrap.getInstance().bootstrap();
-      Bootstrap.getInstance().deploy(jar);
-
-      run();
-
-      Bootstrap.getInstance().shutdown();
-   }
-}
+/*
+ * 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.embedded.tutorial.javase;
+
+import org.jboss.virtual.plugins.context.vfs.AssembledDirectory;
+import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
+import org.jboss.embedded.tutorial.javase.beans.Customer;
+import org.jboss.embedded.tutorial.javase.beans.CustomerDAOBean;
+import org.jboss.embedded.tutorial.javase.beans.CustomerDAOLocal;
+import org.jboss.embedded.tutorial.javase.beans.CustomerDAORemote;
+import org.jboss.embedded.Bootstrap;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class VirtualArchiveDeploy2 extends Main
+{
+   public static void main(String[] args) throws Exception
+   {
+      AssembledDirectory jar = AssembledContextFactory.getInstance().create("tutorial.jar");
+      String[] includes = {"**/beans/*.class"};
+      jar.addResources(Customer.class, includes, null);
+      // Get tutorial-persistence.xml from classloader and alias it within the archive.
+      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");
+
+      Bootstrap.getInstance().bootstrap();
+      Bootstrap.getInstance().deploy(jar);
+
+      run();
+
+      Bootstrap.getInstance().shutdown();
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/VirtualArchiveDeploy2.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/Customer.java
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/Customer.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/Customer.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,62 +1,62 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.javase.beans;
-
-import java.io.Serializable;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.GeneratedValue; import javax.persistence.GenerationType;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Entity
-public class Customer implements Serializable
-{
-   private int id;
-   private String name;
-
-   @Id @GeneratedValue(strategy=GenerationType.AUTO)
-   public int getId()
-   {
-      return id;
-   }
-
-   public void setId(int id)
-   {
-      this.id = id;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.javase.beans;
+
+import java.io.Serializable;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue; import javax.persistence.GenerationType;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Entity
+public class Customer implements Serializable
+{
+   private int id;
+   private String name;
+
+   @Id @GeneratedValue(strategy=GenerationType.AUTO)
+   public int getId()
+   {
+      return id;
+   }
+
+   public void setId(int id)
+   {
+      this.id = id;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+}


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/Customer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOBean.java
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,51 +1,51 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.javase.beans;
-
-import javax.ejb.Stateless;
-import javax.persistence.PersistenceContext;
-import javax.persistence.EntityManager;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Stateless
-public class CustomerDAOBean implements CustomerDAOLocal, CustomerDAORemote
-{
-   @PersistenceContext(unitName="custdb") private EntityManager em;
-
-   public int createCustomer(String name)
-   {
-      Customer cust = new Customer();
-      cust.setName(name);
-      em.persist(cust);
-      return cust.getId();
-   }
-
-   public Customer findCustomer(int id)
-   {
-      return em.find(Customer.class, id);
-   }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.javase.beans;
+
+import javax.ejb.Stateless;
+import javax.persistence.PersistenceContext;
+import javax.persistence.EntityManager;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Stateless
+public class CustomerDAOBean implements CustomerDAOLocal, CustomerDAORemote
+{
+   @PersistenceContext(unitName="custdb") private EntityManager em;
+
+   public int createCustomer(String name)
+   {
+      Customer cust = new Customer();
+      cust.setName(name);
+      em.persist(cust);
+      return cust.getId();
+   }
+
+   public Customer findCustomer(int id)
+   {
+      return em.find(Customer.class, id);
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOLocal.java
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOLocal.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOLocal.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.javase.beans;
-
-import javax.ejb.Local;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Local
-public interface CustomerDAOLocal
-{
-   int createCustomer(String name);
-
-   Customer findCustomer(int id);
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.javase.beans;
+
+import javax.ejb.Local;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Local
+public interface CustomerDAOLocal
+{
+   int createCustomer(String name);
+
+   Customer findCustomer(int id);
+}


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAOLocal.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAORemote.java
===================================================================
--- trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAORemote.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAORemote.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.javase.beans;
-
-import javax.ejb.Remote;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Remote
-public interface CustomerDAORemote
-{
-   int createCustomer(String name);
-
-   Customer findCustomer(int id);
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.javase.beans;
+
+import javax.ejb.Remote;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Remote
+public interface CustomerDAORemote
+{
+   int createCustomer(String name);
+
+   Customer findCustomer(int id);
+}


Property changes on: trunk/embedded/docs/tutorial/plain-java-application/src/org/jboss/embedded/tutorial/javase/beans/CustomerDAORemote.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/tomcat/README.html
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/README.html	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/tomcat/README.html	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,22 +1,22 @@
-<html>
-<body>
-<p>
-<h2> Using Embedded JBoss with Tomcat 5.5</h2>
-
-</p><p>
-This project is built using Ant and the build.xml file included in the tomcat directory.  There are a number ways to deploy things to Tomcat.  The examples here show a few different ways:
-</p><p>
-<ul>
-<li> <i>scan.webinf.lib.war</i> Ant target builds an embedded-jboss.war file in the build directory.  This war's <a href="resources/scan.webinf.lib.xml">web.xml</a> is set up so that every jar in WEB-INF/lib of the war file is scanned for possible JBoss deployments.</li>
-<li> <i>finegrain.war</i> Ant target builds the war.  This war's <a href="resources/finegrain.web.xml">web.xml</a> sets up a Listener that explicitly loads one particular resource from the ServletContext.</li>
-<li> <i>builtin.war</i> Ant target just builds a regular war file.  No special things were configured in web.xml.  For this example, you need to turn on default scanning at the Tomcat level.  Here's how.</li>
-</ul>
-</p><p>
-After deploying the WAR to Tomcat, you can access <a href="http://localhost:8080/embedded-jboss/EmbeddedJBoss.jsp">EmbeddedJBoss.jsp</a> to test the example.
-</p><p>
-</p><p>
-<b>PLEASE NOTE</b>: To find out more on how to install and bootstrap Embedded JBoss in Tomcat, please see our <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedJBoss">Wiki</a>
-</p><p>
-</p>
-</body>
-</html>
+<html>
+<body>
+<p>
+<h2> Using Embedded JBoss with Tomcat 5.5</h2>
+
+</p><p>
+This project is built using Ant and the build.xml file included in the tomcat directory.  There are a number ways to deploy things to Tomcat.  The examples here show a few different ways:
+</p><p>
+<ul>
+<li> <i>scan.webinf.lib.war</i> Ant target builds an embedded-jboss.war file in the build directory.  This war's <a href="resources/scan.webinf.lib.xml">web.xml</a> is set up so that every jar in WEB-INF/lib of the war file is scanned for possible JBoss deployments.</li>
+<li> <i>finegrain.war</i> Ant target builds the war.  This war's <a href="resources/finegrain.web.xml">web.xml</a> sets up a Listener that explicitly loads one particular resource from the ServletContext.</li>
+<li> <i>builtin.war</i> Ant target just builds a regular war file.  No special things were configured in web.xml.  For this example, you need to turn on default scanning at the Tomcat level.  Here's how.</li>
+</ul>
+</p><p>
+After deploying the WAR to Tomcat, you can access <a href="http://localhost:8080/embedded-jboss/EmbeddedJBoss.jsp">EmbeddedJBoss.jsp</a> to test the example.
+</p><p>
+</p><p>
+<b>PLEASE NOTE</b>: To find out more on how to install and bootstrap Embedded JBoss in Tomcat, please see our <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedJBoss">Wiki</a>
+</p><p>
+</p>
+</body>
+</html>


Property changes on: trunk/embedded/docs/tutorial/tomcat/README.html
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/docs/tutorial/tomcat/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/docs/tutorial/tomcat/resources/META-INF/persistence.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/tomcat/resources/builtin.web.xml
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/resources/builtin.web.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/tomcat/resources/builtin.web.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-   <description>Embedded JBoss</description>
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app>
+   <description>Embedded JBoss</description>
+</web-app>


Property changes on: trunk/embedded/docs/tutorial/tomcat/resources/builtin.web.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/tomcat/resources/finegrain.web.xml
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/resources/finegrain.web.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/tomcat/resources/finegrain.web.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-   <description>Embedded JBoss</description>
-
-   <context-param>
-      <param-name>jboss.embedded.resources</param-name>
-      <param-value>/WEB-INF/lib/tutorial.jar</param-value>
-   </context-param>
-
-   <listener>
-      <listener-class>org.jboss.embedded.ServletContextResourceScanner</listener-class>
-   </listener>
-
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app>
+   <description>Embedded JBoss</description>
+
+   <context-param>
+      <param-name>jboss.embedded.resources</param-name>
+      <param-value>/WEB-INF/lib/tutorial.jar</param-value>
+   </context-param>
+
+   <listener>
+      <listener-class>org.jboss.embedded.ServletContextResourceScanner</listener-class>
+   </listener>
+
+</web-app>


Property changes on: trunk/embedded/docs/tutorial/tomcat/resources/finegrain.web.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/tomcat/resources/scan.webinf.lib.xml
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/resources/scan.webinf.lib.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/tomcat/resources/scan.webinf.lib.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-   <description>Embedded JBoss</description>
-
-   <listener>
-      <listener-class>org.jboss.embedded.WebInfLibScanner</listener-class>
-   </listener>
-
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app>
+   <description>Embedded JBoss</description>
+
+   <listener>
+      <listener-class>org.jboss.embedded.WebInfLibScanner</listener-class>
+   </listener>
+
+</web-app>


Property changes on: trunk/embedded/docs/tutorial/tomcat/resources/scan.webinf.lib.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/docs/tutorial/tomcat/src/EmbeddedJBoss.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/Customer.java
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/Customer.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/Customer.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,62 +1,62 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.war.beans;
-
-import java.io.Serializable;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.GeneratedValue; import javax.persistence.GenerationType;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Entity
-public class Customer implements Serializable
-{
-   private int id;
-   private String name;
-
-   @Id @GeneratedValue(strategy=GenerationType.AUTO)
-   public int getId()
-   {
-      return id;
-   }
-
-   public void setId(int id)
-   {
-      this.id = id;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.war.beans;
+
+import java.io.Serializable;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue; import javax.persistence.GenerationType;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Entity
+public class Customer implements Serializable
+{
+   private int id;
+   private String name;
+
+   @Id @GeneratedValue(strategy=GenerationType.AUTO)
+   public int getId()
+   {
+      return id;
+   }
+
+   public void setId(int id)
+   {
+      this.id = id;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+}


Property changes on: trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/Customer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOBean.java
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,51 +1,51 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.war.beans;
-
-import javax.ejb.Stateless;
-import javax.persistence.PersistenceContext;
-import javax.persistence.EntityManager;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Stateless
-public class CustomerDAOBean implements CustomerDAOLocal, CustomerDAORemote
-{
-   @PersistenceContext(unitName="custdb") private EntityManager em;
-
-   public int createCustomer(String name)
-   {
-      Customer cust = new Customer();
-      cust.setName(name);
-      em.persist(cust);
-      return cust.getId();
-   }
-
-   public Customer findCustomer(int id)
-   {
-      return em.find(Customer.class, id);
-   }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.war.beans;
+
+import javax.ejb.Stateless;
+import javax.persistence.PersistenceContext;
+import javax.persistence.EntityManager;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Stateless
+public class CustomerDAOBean implements CustomerDAOLocal, CustomerDAORemote
+{
+   @PersistenceContext(unitName="custdb") private EntityManager em;
+
+   public int createCustomer(String name)
+   {
+      Customer cust = new Customer();
+      cust.setName(name);
+      em.persist(cust);
+      return cust.getId();
+   }
+
+   public Customer findCustomer(int id)
+   {
+      return em.find(Customer.class, id);
+   }
+}


Property changes on: trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOLocal.java
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOLocal.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOLocal.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.war.beans;
-
-import javax.ejb.Local;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Local
-public interface CustomerDAOLocal
-{
-   int createCustomer(String name);
-
-   Customer findCustomer(int id);
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.war.beans;
+
+import javax.ejb.Local;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Local
+public interface CustomerDAOLocal
+{
+   int createCustomer(String name);
+
+   Customer findCustomer(int id);
+}


Property changes on: trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAOLocal.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAORemote.java
===================================================================
--- trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAORemote.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAORemote.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.embedded.tutorial.war.beans;
-
-import javax.ejb.Remote;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 61136 $
- */
- at Remote
-public interface CustomerDAORemote
-{
-   int createCustomer(String name);
-
-   Customer findCustomer(int id);
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.embedded.tutorial.war.beans;
+
+import javax.ejb.Remote;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61136 $
+ */
+ at Remote
+public interface CustomerDAORemote
+{
+   int createCustomer(String name);
+
+   Customer findCustomer(int id);
+}


Property changes on: trunk/embedded/docs/tutorial/tomcat/src/org/jboss/embedded/tutorial/war/beans/CustomerDAORemote.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/embedded.bat
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/lgpl.html
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/BeanCompiler.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/BeanCompiler.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/BeanCompiler.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,91 +1,91 @@
-/*
- * 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.embedded;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.MalformedURLException;
-
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class   BeanCompiler
-{
-   public static void main(String[] args) throws Exception
-   {
-      for (String arg : args)
-      {
-         compile(arg);
-      }
-   }
-
-   public static void compile(String arg) throws Exception
-   {
-      System.out.println("compiling: " + arg);
-      File fp = new File(arg);
-      KernelDeployment deployment = parse(fp);
-
-      long start = System.currentTimeMillis();
-
-      FileOutputStream fos = new FileOutputStream(arg + ".bin");
-      ObjectOutputStream oos = new ObjectOutputStream(fos);
-      oos.writeObject(deployment);
-      oos.close();
-      fos.close();
-
-      FileInputStream fis = new FileInputStream(arg + ".bin");
-      ObjectInputStream ois = new ObjectInputStream(fis);
-      deployment = (KernelDeployment)ois.readObject();
-      ois.close();
-      fis.close();
-
-      long end = System.currentTimeMillis() - start;
-
-      System.out.println("object loading took: " + end);
-   }
-
-   public static KernelDeployment parse(File fp)
-           throws JBossXBException, MalformedURLException
-   {
-      long start = System.currentTimeMillis();
-      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
-      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
-      Unmarshaller unmarshaller = factory.newUnmarshaller();
-      KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(fp.toURL().toString(), resolver);
-      long end = System.currentTimeMillis() - start;
-      System.out.println("XML parsing took: " + end);
-      return deployment;
-   }
-}
+/*
+ * 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.embedded;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.MalformedURLException;
+
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class   BeanCompiler
+{
+   public static void main(String[] args) throws Exception
+   {
+      for (String arg : args)
+      {
+         compile(arg);
+      }
+   }
+
+   public static void compile(String arg) throws Exception
+   {
+      System.out.println("compiling: " + arg);
+      File fp = new File(arg);
+      KernelDeployment deployment = parse(fp);
+
+      long start = System.currentTimeMillis();
+
+      FileOutputStream fos = new FileOutputStream(arg + ".bin");
+      ObjectOutputStream oos = new ObjectOutputStream(fos);
+      oos.writeObject(deployment);
+      oos.close();
+      fos.close();
+
+      FileInputStream fis = new FileInputStream(arg + ".bin");
+      ObjectInputStream ois = new ObjectInputStream(fis);
+      deployment = (KernelDeployment)ois.readObject();
+      ois.close();
+      fis.close();
+
+      long end = System.currentTimeMillis() - start;
+
+      System.out.println("object loading took: " + end);
+   }
+
+   public static KernelDeployment parse(File fp)
+           throws JBossXBException, MalformedURLException
+   {
+      long start = System.currentTimeMillis();
+      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
+      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
+      Unmarshaller unmarshaller = factory.newUnmarshaller();
+      KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(fp.toURL().toString(), resolver);
+      long end = System.currentTimeMillis() - start;
+      System.out.println("XML parsing took: " + end);
+      return deployment;
+   }
+}


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

Modified: trunk/embedded/src/main/java/org/jboss/embedded/BinaryBootstrap.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/BinaryBootstrap.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/BinaryBootstrap.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,156 +1,156 @@
-/*
- * 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.embedded;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployer;
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision: 1.1 $
- */
-public class BinaryBootstrap extends Bootstrap
-{
-   private static Bootstrap instance;
-
-   public BinaryBootstrap(Kernel kernel)
-   {
-      super(kernel);
-   }
-
-   /**
-    * For those applications that need a singelton Bootstrap instance
-    *
-    * @return the bootstrap
-    */
-   public static synchronized Bootstrap getInstance()
-   {
-      if (instance == null)
-         instance = new BinaryBootstrap(createKernel());
-
-      return instance;
-   }
-
-   public static KernelDeployment parse(URL url) throws JBossXBException, MalformedURLException
-   {
-      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
-      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
-      Unmarshaller unmarshaller = factory.newUnmarshaller();
-      return (KernelDeployment) unmarshaller.unmarshal(url.toString(), resolver);
-   }
-
-   public static void store(KernelDeployment deployment, File binFile) throws Exception
-   {
-      FileOutputStream fos = new FileOutputStream(binFile);
-      ObjectOutputStream oos = new ObjectOutputStream(fos);
-      try
-      {
-         oos.writeObject(deployment);
-      }
-      finally
-      {
-         oos.close();
-         fos.close();
-      }
-   }
-
-   public static KernelDeployment load(File binFile) throws Exception
-   {
-      FileInputStream fis = new FileInputStream(binFile);
-      ObjectInputStream ois = new ObjectInputStream(fis);
-      try
-      {
-         return (KernelDeployment)ois.readObject();
-      }
-      finally
-      {
-         ois.close();
-         fis.close();
-      }
-   }
-
-   @Override
-   protected void deployBaseBootstrapUrl(URL url) throws DeploymentException
-   {
-      try
-      {
-         URI uri = url.toURI();
-         URI binUri = new URI(uri.toString() + ".bin");
-         File textFile = new File(uri);
-         File binFile = new File(binUri);
-         KernelDeployment deployment;
-
-         if (!binFile.exists() && !textFile.exists())
-         {
-            throw new DeploymentException("Unable to locate bootstrap file: " + url);
-         }
-         else if (binFile.exists() && textFile.exists())
-         {
-            if (textFile.lastModified() > binFile.lastModified())
-            {
-               System.out.println("new bootstrap file...");
-               deployment = parse(url);
-               store(deployment, binFile);
-            }
-            else
-            {
-               deployment = load(binFile);
-            }
-         }
-         else if (textFile.exists())
-         {
-            deployment = parse(url);
-            store(deployment, binFile);
-         }
-         else
-         {
-            deployment = load(binFile);
-         }
-
-         AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
-         deployer.deploy(deployment);
-      }
-      catch (Throwable throwable)
-      {
-         throw new RuntimeException("Unable to bootstrap: ", throwable);
-      }
-   }
-}
+/*
+ * 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.embedded;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployer;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @author adrian at jboss.org
+ * @version $Revision: 1.1 $
+ */
+public class BinaryBootstrap extends Bootstrap
+{
+   private static Bootstrap instance;
+
+   public BinaryBootstrap(Kernel kernel)
+   {
+      super(kernel);
+   }
+
+   /**
+    * For those applications that need a singelton Bootstrap instance
+    *
+    * @return the bootstrap
+    */
+   public static synchronized Bootstrap getInstance()
+   {
+      if (instance == null)
+         instance = new BinaryBootstrap(createKernel());
+
+      return instance;
+   }
+
+   public static KernelDeployment parse(URL url) throws JBossXBException, MalformedURLException
+   {
+      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
+      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
+      Unmarshaller unmarshaller = factory.newUnmarshaller();
+      return (KernelDeployment) unmarshaller.unmarshal(url.toString(), resolver);
+   }
+
+   public static void store(KernelDeployment deployment, File binFile) throws Exception
+   {
+      FileOutputStream fos = new FileOutputStream(binFile);
+      ObjectOutputStream oos = new ObjectOutputStream(fos);
+      try
+      {
+         oos.writeObject(deployment);
+      }
+      finally
+      {
+         oos.close();
+         fos.close();
+      }
+   }
+
+   public static KernelDeployment load(File binFile) throws Exception
+   {
+      FileInputStream fis = new FileInputStream(binFile);
+      ObjectInputStream ois = new ObjectInputStream(fis);
+      try
+      {
+         return (KernelDeployment)ois.readObject();
+      }
+      finally
+      {
+         ois.close();
+         fis.close();
+      }
+   }
+
+   @Override
+   protected void deployBaseBootstrapUrl(URL url) throws DeploymentException
+   {
+      try
+      {
+         URI uri = url.toURI();
+         URI binUri = new URI(uri.toString() + ".bin");
+         File textFile = new File(uri);
+         File binFile = new File(binUri);
+         KernelDeployment deployment;
+
+         if (!binFile.exists() && !textFile.exists())
+         {
+            throw new DeploymentException("Unable to locate bootstrap file: " + url);
+         }
+         else if (binFile.exists() && textFile.exists())
+         {
+            if (textFile.lastModified() > binFile.lastModified())
+            {
+               System.out.println("new bootstrap file...");
+               deployment = parse(url);
+               store(deployment, binFile);
+            }
+            else
+            {
+               deployment = load(binFile);
+            }
+         }
+         else if (textFile.exists())
+         {
+            deployment = parse(url);
+            store(deployment, binFile);
+         }
+         else
+         {
+            deployment = load(binFile);
+         }
+
+         AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
+         deployer.deploy(deployment);
+      }
+      catch (Throwable throwable)
+      {
+         throw new RuntimeException("Unable to bootstrap: ", throwable);
+      }
+   }
+}


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

Modified: trunk/embedded/src/main/java/org/jboss/embedded/Bootstrap.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/Bootstrap.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/Bootstrap.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,517 +1,517 @@
-/*
- * 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.embedded;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.List;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.deployers.client.spi.main.MainDeployer;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.embedded.adapters.ServerConfig;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
-import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
-import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * Basic bootstrap class for embeddable JBoss
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision: 1.1 $
- */
-public class Bootstrap
-{
-   private static final Logger log = Logger.getLogger(Bootstrap.class);
-
-   public static final String BOOTSTRAP_RESOURCE_PATH="jboss.embedded.bootstrap.resource.path";
-   public static final String BOOTSTRAP_RESOURCE_FILE="conf/bootstrap-beans.xml";
-
-   protected Kernel kernel;
-   protected ClassLoader loader = Thread.currentThread().getContextClassLoader();
-   protected MainDeployer mainDeployer;
-   protected boolean started;
-   protected boolean ignoreShutdownErrors;
-
-   private static Bootstrap instance;
-
-   /**
-    * For those applications that need a singelton Bootstrap instance
-    *
-    * @return the bootstrap
-    */
-   public static synchronized Bootstrap getInstance()
-   {
-      if (instance == null)
-         instance = new Bootstrap(createKernel());
-
-      return instance;
-   }
-
-   public Bootstrap()
-   {
-      this.kernel = createKernel();
-   }
-
-   public Bootstrap(Kernel kernel)
-   {
-      this.kernel = kernel;
-   }
-
-   public boolean isIgnoreShutdownErrors()
-   {
-      return ignoreShutdownErrors;
-   }
-
-   public void setIgnoreShutdownErrors(boolean ignoreShutdownErrors)
-   {
-      this.ignoreShutdownErrors = ignoreShutdownErrors;
-   }
-
-   public boolean isStarted()
-   {
-      return started;
-   }
-
-   public Kernel getKernel()
-   {
-      return kernel;
-   }
-
-   public void setKernel(Kernel kernel)
-   {
-      this.kernel = kernel;
-   }
-
-   public ClassLoader getLoader()
-   {
-      return loader;
-   }
-
-   public void setLoader(ClassLoader loader)
-   {
-      this.loader = loader;
-   }
-
-   protected static Kernel createKernel()
-   {
-      BasicBootstrap bootstrap1 = new BasicBootstrap();
-      bootstrap1.run();
-      return bootstrap1.getKernel();
-   }
-
-   protected void deployBaseBootstrapUrl(URL url) throws Throwable
-   {
-      BeanXMLDeployer deployer = new BeanXMLDeployer(kernel);
-      deployer.deploy(url);
-   }
-
-   protected void bootstrapURL(URL url) throws DeploymentException
-   {
-      try
-      {
-         // ServerConfig has to be created and installed before boostrap as we may want to use
-         // system properties set up in ServerConfig
-         ServerConfig config = new ServerConfig();
-         AbstractBeanMetaData bmd = new AbstractBeanMetaData("ServerConfig", ServerConfig.class.getName());
-         kernel.getController().install(bmd, config);
-         deployBaseBootstrapUrl(url);
-         mainDeployer = (MainDeployer)kernel.getRegistry().getEntry("MainDeployer").getTarget();
-      }
-      catch (Throwable throwable)
-      {
-         throw new RuntimeException("Unable to bootstrap: ", throwable);
-      }
-      mainDeployer.checkComplete();
-      started = true;
-   }
-
-   /**
-    *
-    * Specify top classpath resource directory where base JBoss Embedded directory structure is.
-
-    * The Embedded JBoss directory structure is determined by extrapolating a directory from a base
-    * classpath resource.
-
-    * The absolute directory will be determined by doing
-    *   classloader.getResource(bootstrapResourcePath + "conf/bootstrap-beans.xml")
-    *
-    *
-    * @param bootstrapResourcePath
-    * @throws DeploymentException
-    */
-   public void bootstrap(String bootstrapResourcePath) throws DeploymentException
-   {
-      if (bootstrapResourcePath == null)
-      {
-         bootstrapResourcePath = "";
-      }
-      else if (!bootstrapResourcePath.equals("") && !bootstrapResourcePath.endsWith("/"))
-      {
-         bootstrapResourcePath += "/";
-      }
-      System.setProperty(BOOTSTRAP_RESOURCE_PATH, bootstrapResourcePath);
-      bootstrapResourcePath += BOOTSTRAP_RESOURCE_FILE;
-      URL url = loader.getResource(bootstrapResourcePath);
-      if (url == null)
-         throw new DeploymentException("Unable to find bootstrap file: " + bootstrapResourcePath + " in classpath");
-
-      bootstrapURL(url);
-   }
-
-   /**
-    * Will obtain resource path from jboss.embedded.bootstrap.resource.path System Property.
-    * Otherwise it just invoked bootstrap(String bootstrapResourcePath) with ""
-    *
-    * @throws DeploymentException
-    */
-   public void bootstrap() throws DeploymentException
-   {
-      String path = System.getProperty(BOOTSTRAP_RESOURCE_PATH, "");
-      bootstrap(path);
-   }
-
-   /**
-    * Shutdown the kernel and all deployments
-    *
-    */
-   public void shutdown()
-   {
-      try
-      {
-         mainDeployer.shutdown();
-      }
-      catch (Exception e)
-      {
-         if (!ignoreShutdownErrors)
-            throw new RuntimeException(e);
-         else
-            log.error("Failed to shutdown Bootstrap", e);
-      }
-   }
-
-   /**
-    * Look in java.class.path for any .jar or class directories whose base file/dir match
-    * any base file/dir names in the comma delimited path parameter
-    *
-    * If classpath is:
-    *
-    * /home/wburke/jars/foo.jar
-    *
-    * and path is:
-    *
-    * "foo.jar"
-    *
-    * This will be a match and that .jar file will be deployed
-    *
-    * @param path can be comma delimited
-    * @throws DeploymentException
-    */
-   public void scanClasspath(String path) throws DeploymentException
-   {
-      DeploymentGroup group = createDeploymentGroup();
-      group.addClasspath(path);
-      group.process();
-   }
-
-   /**
-    * Undeploy something deployed via scanSclasspath()
-    *
-    * @param path
-    * @throws DeploymentException
-    */
-   public void undeployClasspath(String path) throws DeploymentException
-   {
-      List<URL> paths = DeploymentGroup.getClassPaths(path);
-      for (URL url : paths)
-      {
-         undeploy(url);
-      }
-   }
-
-   /**
-    * Deploy the classpath directories or .jar files a classloader resource is located in.
-    * ClassLoader.getResources() is used to find the base resources.
-    *
-    * i.e.
-    *
-    * classpath is "/home/wburke/lib/tutorial.jar:/home/wburke/lib/pu.jar"
-    * tutorial.jar and pu.jar has "META-INF/persistence.xml" resource within it.
-    *
-    * addResourceBases("META-INF/persistence.xml") will try and deploy tutorial.jar  and pu.jar because
-    * the both have the META-INF/persistence.xml resource within them.
-    *
-    *
-    * @param baseResource
-    * @throws DeploymentException
-    */
-   public void deployResourceBase(String baseResource) throws DeploymentException
-   {
-      DeploymentGroup group = createDeploymentGroup();
-      group.addResourceBase(baseResource);
-      group.process();
-   }
-
-   /**
-    *
-    *
-    * @param baseResource
-    * @throws DeploymentException
-    */
-   public void deployResourceBases(String baseResource) throws DeploymentException
-   {
-      DeploymentGroup group = createDeploymentGroup();
-      group.addResourceBases(baseResource);
-      group.process();
-   }
-
-   /**
-    * Find the .class resource of the given class
-    * Deploy a URL pointing to the classpath the resource is located in.
-    *
-    * i.e.
-    *
-    * classpath is "/home/wburke/lib/tutorial.jar"
-    * tutorial.jar has "META-INF/persistence.xml" resource within it.
-    *
-    * addResourceBase("META-INF/persistence.xml") will try and deploy tutorial.jar
-    *
-    * classloader.getResource("META-INF/persistence.xml") is used to determine the base location
-    *
-    *
-    * @param baseResource
-    * @throws DeploymentException
-    */
-   public void deployResourceBase(Class baseResource) throws DeploymentException
-   {
-      DeploymentGroup group = createDeploymentGroup();
-      group.addResourceBase(baseResource);
-      group.process();
-   }
-
-   public void deploy(URL url) throws DeploymentException
-   {
-      DeploymentGroup group = createDeploymentGroup();
-      group.add(url);
-      group.process();
-   }
-
-   public void deploy(VirtualFile file) throws DeploymentException
-   {
-      DeploymentGroup group = createDeploymentGroup();
-      group.add(file);
-      group.process();
-   }
-
-   /**
-    * Deploy a resource found by getResource() on the kernel's classloader
-    *
-    *
-    * @param resource
-    * @throws DeploymentException
-    */
-   public void deployResource(String resource) throws DeploymentException
-   {
-      DeploymentGroup group = createDeploymentGroup();
-      group.addResource(resource);
-      group.process();
-   }
-
-   /**
-    * Define a deploy directory and deploy all files within it.  The recurse parameter tells whether to recurse into
-    * sub directories for deployments
-    *
-    *
-    * @param url
-    * @param recurse
-    * @throws DeploymentException
-    * @throws IOException
-    */
-   public void deployDirectory(URL url, boolean recurse) throws DeploymentException, IOException
-   {
-      DeploymentGroup group = createDeploymentGroup();
-      group.addDirectory(url, recurse);
-      group.process();
-   }
-
-   /**
-    *
-    * Find a deploy directory from a base resource
-    *
-    * @param resource
-    * @param recurse
-    * @throws DeploymentException
-    * @throws IOException
-    */
-   public void deployDirectoryFromResource(String resource, boolean recurse) throws DeploymentException, IOException
-   {
-      DeploymentGroup group = createDeploymentGroup();
-      group.addDirectoryByResource(resource, recurse);
-      group.process();
-   }
-
-   /**
-    * opposite of deployResourceBase()
-    *
-    *
-    *
-    * @param baseResource
-    * @throws DeploymentException
-    */
-   public void undeployResourceBase(String baseResource) throws DeploymentException
-   {
-      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-      if (loader != null)
-         classLoader = loader;
-
-      URL url = classLoader.getResource(baseResource);
-      if (url == null)
-         throw new RuntimeException("Could not find baseResource: " + baseResource);
-
-      undeployResourceBase(url, baseResource);
-   }
-
-   private void undeployResourceBase(URL url, String baseResource)
-           throws DeploymentException
-   {
-      String urlString = url.toString();
-      int idx = urlString.lastIndexOf(baseResource);
-      urlString = urlString.substring(0, idx);
-      URL deployUrl;
-      try
-      {
-         deployUrl = new URL(urlString);
-      }
-      catch (MalformedURLException e)
-      {
-         throw new RuntimeException(e);
-      }
-      undeploy(deployUrl);
-   }
-
-   public void undeployResourceBases(String baseResource) throws DeploymentException
-   {
-      try
-      {
-         Enumeration<URL> urls = loader.getResources(baseResource);
-         while (urls.hasMoreElements())
-         {
-            URL url = urls.nextElement();
-            undeployResourceBase(url, baseResource);
-         }
-      }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   /**
-    * opposite of deployResourceBase()
-    *
-    *
-    *
-    * @param baseResource
-    * @throws DeploymentException
-    */
-   public void undeployResourceBase(Class baseResource) throws DeploymentException
-   {
-      String resource = baseResource.getName().replace('.', '/') + ".class";
-      undeployResourceBase(resource);
-   }
-   /**
-    * opposite of deployResource
-    *
-    * @param resource
-    * @throws DeploymentException
-    */
-   public void undeployResource(String resource) throws DeploymentException
-   {
-      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-      if (loader != null)
-         classLoader = loader;
-
-      URL url = classLoader.getResource(resource);
-      if (url == null)
-         throw new NullPointerException("Resource was null: " + resource);
-
-      undeploy(url);
-   }
-
-   public void undeploy(URL url) throws DeploymentException
-   {
-      VirtualFile vf = DeploymentGroup.getVirtualFile(url);
-      undeploy(vf);
-   }
-
-   public void undeploy(VirtualFile vf)
-           throws DeploymentException
-   {
-      mainDeployer.removeDeployment(vf.getName());
-      mainDeployer.process();
-   }
-
-   public void undeployDirectory(URL url, boolean recurse) throws DeploymentException, IOException
-   {
-      List<VirtualFile> files = DeploymentGroup.getDeployerDirUrls(null, url, recurse);
-      for (VirtualFile vf : files)
-         mainDeployer.removeDeployment(vf.getName());
-      mainDeployer.process();
-   }
-
-   public void undeployDirectoryFromResource(String resource, boolean recurse) throws DeploymentException, IOException
-   {
-      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-      if (loader != null) classLoader = loader;
-      List<VirtualFile> files = DeploymentGroup.getDeployerDirUrlsFromResource(null, classLoader, resource, recurse);
-      for (VirtualFile vf : files)
-         mainDeployer.removeDeployment(vf.getName());
-      mainDeployer.process();
-   }
-
-   public DeploymentGroup createDeploymentGroup()
-   {
-      DeploymentGroup group = new DeploymentGroup();
-      group.setClassLoader(loader);
-      group.setMainDeployer(mainDeployer);
-      group.setKernel(kernel);
-      return group;
-   }
-
-   public static void main(String[] args) throws Exception
-   {
-      getInstance().bootstrap();
-      for (String arg : args)
-      {
-         getInstance().scanClasspath(arg);
-      }
-      System.out.println("Running...");
-      Thread t = new Thread();
-      t.setDaemon(false);
-      t.start();
-   }
+/*
+ * 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.embedded;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.List;
+
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.embedded.adapters.ServerConfig;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Basic bootstrap class for embeddable JBoss
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @author adrian at jboss.org
+ * @version $Revision: 1.1 $
+ */
+public class Bootstrap
+{
+   private static final Logger log = Logger.getLogger(Bootstrap.class);
+
+   public static final String BOOTSTRAP_RESOURCE_PATH="jboss.embedded.bootstrap.resource.path";
+   public static final String BOOTSTRAP_RESOURCE_FILE="conf/bootstrap-beans.xml";
+
+   protected Kernel kernel;
+   protected ClassLoader loader = Thread.currentThread().getContextClassLoader();
+   protected MainDeployer mainDeployer;
+   protected boolean started;
+   protected boolean ignoreShutdownErrors;
+
+   private static Bootstrap instance;
+
+   /**
+    * For those applications that need a singelton Bootstrap instance
+    *
+    * @return the bootstrap
+    */
+   public static synchronized Bootstrap getInstance()
+   {
+      if (instance == null)
+         instance = new Bootstrap(createKernel());
+
+      return instance;
+   }
+
+   public Bootstrap()
+   {
+      this.kernel = createKernel();
+   }
+
+   public Bootstrap(Kernel kernel)
+   {
+      this.kernel = kernel;
+   }
+
+   public boolean isIgnoreShutdownErrors()
+   {
+      return ignoreShutdownErrors;
+   }
+
+   public void setIgnoreShutdownErrors(boolean ignoreShutdownErrors)
+   {
+      this.ignoreShutdownErrors = ignoreShutdownErrors;
+   }
+
+   public boolean isStarted()
+   {
+      return started;
+   }
+
+   public Kernel getKernel()
+   {
+      return kernel;
+   }
+
+   public void setKernel(Kernel kernel)
+   {
+      this.kernel = kernel;
+   }
+
+   public ClassLoader getLoader()
+   {
+      return loader;
+   }
+
+   public void setLoader(ClassLoader loader)
+   {
+      this.loader = loader;
+   }
+
+   protected static Kernel createKernel()
+   {
+      BasicBootstrap bootstrap1 = new BasicBootstrap();
+      bootstrap1.run();
+      return bootstrap1.getKernel();
+   }
+
+   protected void deployBaseBootstrapUrl(URL url) throws Throwable
+   {
+      BeanXMLDeployer deployer = new BeanXMLDeployer(kernel);
+      deployer.deploy(url);
+   }
+
+   protected void bootstrapURL(URL url) throws DeploymentException
+   {
+      try
+      {
+         // ServerConfig has to be created and installed before boostrap as we may want to use
+         // system properties set up in ServerConfig
+         ServerConfig config = new ServerConfig();
+         AbstractBeanMetaData bmd = new AbstractBeanMetaData("ServerConfig", ServerConfig.class.getName());
+         kernel.getController().install(bmd, config);
+         deployBaseBootstrapUrl(url);
+         mainDeployer = (MainDeployer)kernel.getRegistry().getEntry("MainDeployer").getTarget();
+      }
+      catch (Throwable throwable)
+      {
+         throw new RuntimeException("Unable to bootstrap: ", throwable);
+      }
+      mainDeployer.checkComplete();
+      started = true;
+   }
+
+   /**
+    *
+    * Specify top classpath resource directory where base JBoss Embedded directory structure is.
+
+    * The Embedded JBoss directory structure is determined by extrapolating a directory from a base
+    * classpath resource.
+
+    * The absolute directory will be determined by doing
+    *   classloader.getResource(bootstrapResourcePath + "conf/bootstrap-beans.xml")
+    *
+    *
+    * @param bootstrapResourcePath
+    * @throws DeploymentException
+    */
+   public void bootstrap(String bootstrapResourcePath) throws DeploymentException
+   {
+      if (bootstrapResourcePath == null)
+      {
+         bootstrapResourcePath = "";
+      }
+      else if (!bootstrapResourcePath.equals("") && !bootstrapResourcePath.endsWith("/"))
+      {
+         bootstrapResourcePath += "/";
+      }
+      System.setProperty(BOOTSTRAP_RESOURCE_PATH, bootstrapResourcePath);
+      bootstrapResourcePath += BOOTSTRAP_RESOURCE_FILE;
+      URL url = loader.getResource(bootstrapResourcePath);
+      if (url == null)
+         throw new DeploymentException("Unable to find bootstrap file: " + bootstrapResourcePath + " in classpath");
+
+      bootstrapURL(url);
+   }
+
+   /**
+    * Will obtain resource path from jboss.embedded.bootstrap.resource.path System Property.
+    * Otherwise it just invoked bootstrap(String bootstrapResourcePath) with ""
+    *
+    * @throws DeploymentException
+    */
+   public void bootstrap() throws DeploymentException
+   {
+      String path = System.getProperty(BOOTSTRAP_RESOURCE_PATH, "");
+      bootstrap(path);
+   }
+
+   /**
+    * Shutdown the kernel and all deployments
+    *
+    */
+   public void shutdown()
+   {
+      try
+      {
+         mainDeployer.shutdown();
+      }
+      catch (Exception e)
+      {
+         if (!ignoreShutdownErrors)
+            throw new RuntimeException(e);
+         else
+            log.error("Failed to shutdown Bootstrap", e);
+      }
+   }
+
+   /**
+    * Look in java.class.path for any .jar or class directories whose base file/dir match
+    * any base file/dir names in the comma delimited path parameter
+    *
+    * If classpath is:
+    *
+    * /home/wburke/jars/foo.jar
+    *
+    * and path is:
+    *
+    * "foo.jar"
+    *
+    * This will be a match and that .jar file will be deployed
+    *
+    * @param path can be comma delimited
+    * @throws DeploymentException
+    */
+   public void scanClasspath(String path) throws DeploymentException
+   {
+      DeploymentGroup group = createDeploymentGroup();
+      group.addClasspath(path);
+      group.process();
+   }
+
+   /**
+    * Undeploy something deployed via scanSclasspath()
+    *
+    * @param path
+    * @throws DeploymentException
+    */
+   public void undeployClasspath(String path) throws DeploymentException
+   {
+      List<URL> paths = DeploymentGroup.getClassPaths(path);
+      for (URL url : paths)
+      {
+         undeploy(url);
+      }
+   }
+
+   /**
+    * Deploy the classpath directories or .jar files a classloader resource is located in.
+    * ClassLoader.getResources() is used to find the base resources.
+    *
+    * i.e.
+    *
+    * classpath is "/home/wburke/lib/tutorial.jar:/home/wburke/lib/pu.jar"
+    * tutorial.jar and pu.jar has "META-INF/persistence.xml" resource within it.
+    *
+    * addResourceBases("META-INF/persistence.xml") will try and deploy tutorial.jar  and pu.jar because
+    * the both have the META-INF/persistence.xml resource within them.
+    *
+    *
+    * @param baseResource
+    * @throws DeploymentException
+    */
+   public void deployResourceBase(String baseResource) throws DeploymentException
+   {
+      DeploymentGroup group = createDeploymentGroup();
+      group.addResourceBase(baseResource);
+      group.process();
+   }
+
+   /**
+    *
+    *
+    * @param baseResource
+    * @throws DeploymentException
+    */
+   public void deployResourceBases(String baseResource) throws DeploymentException
+   {
+      DeploymentGroup group = createDeploymentGroup();
+      group.addResourceBases(baseResource);
+      group.process();
+   }
+
+   /**
+    * Find the .class resource of the given class
+    * Deploy a URL pointing to the classpath the resource is located in.
+    *
+    * i.e.
+    *
+    * classpath is "/home/wburke/lib/tutorial.jar"
+    * tutorial.jar has "META-INF/persistence.xml" resource within it.
+    *
+    * addResourceBase("META-INF/persistence.xml") will try and deploy tutorial.jar
+    *
+    * classloader.getResource("META-INF/persistence.xml") is used to determine the base location
+    *
+    *
+    * @param baseResource
+    * @throws DeploymentException
+    */
+   public void deployResourceBase(Class baseResource) throws DeploymentException
+   {
+      DeploymentGroup group = createDeploymentGroup();
+      group.addResourceBase(baseResource);
+      group.process();
+   }
+
+   public void deploy(URL url) throws DeploymentException
+   {
+      DeploymentGroup group = createDeploymentGroup();
+      group.add(url);
+      group.process();
+   }
+
+   public void deploy(VirtualFile file) throws DeploymentException
+   {
+      DeploymentGroup group = createDeploymentGroup();
+      group.add(file);
+      group.process();
+   }
+
+   /**
+    * Deploy a resource found by getResource() on the kernel's classloader
+    *
+    *
+    * @param resource
+    * @throws DeploymentException
+    */
+   public void deployResource(String resource) throws DeploymentException
+   {
+      DeploymentGroup group = createDeploymentGroup();
+      group.addResource(resource);
+      group.process();
+   }
+
+   /**
+    * Define a deploy directory and deploy all files within it.  The recurse parameter tells whether to recurse into
+    * sub directories for deployments
+    *
+    *
+    * @param url
+    * @param recurse
+    * @throws DeploymentException
+    * @throws IOException
+    */
+   public void deployDirectory(URL url, boolean recurse) throws DeploymentException, IOException
+   {
+      DeploymentGroup group = createDeploymentGroup();
+      group.addDirectory(url, recurse);
+      group.process();
+   }
+
+   /**
+    *
+    * Find a deploy directory from a base resource
+    *
+    * @param resource
+    * @param recurse
+    * @throws DeploymentException
+    * @throws IOException
+    */
+   public void deployDirectoryFromResource(String resource, boolean recurse) throws DeploymentException, IOException
+   {
+      DeploymentGroup group = createDeploymentGroup();
+      group.addDirectoryByResource(resource, recurse);
+      group.process();
+   }
+
+   /**
+    * opposite of deployResourceBase()
+    *
+    *
+    *
+    * @param baseResource
+    * @throws DeploymentException
+    */
+   public void undeployResourceBase(String baseResource) throws DeploymentException
+   {
+      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+      if (loader != null)
+         classLoader = loader;
+
+      URL url = classLoader.getResource(baseResource);
+      if (url == null)
+         throw new RuntimeException("Could not find baseResource: " + baseResource);
+
+      undeployResourceBase(url, baseResource);
+   }
+
+   private void undeployResourceBase(URL url, String baseResource)
+           throws DeploymentException
+   {
+      String urlString = url.toString();
+      int idx = urlString.lastIndexOf(baseResource);
+      urlString = urlString.substring(0, idx);
+      URL deployUrl;
+      try
+      {
+         deployUrl = new URL(urlString);
+      }
+      catch (MalformedURLException e)
+      {
+         throw new RuntimeException(e);
+      }
+      undeploy(deployUrl);
+   }
+
+   public void undeployResourceBases(String baseResource) throws DeploymentException
+   {
+      try
+      {
+         Enumeration<URL> urls = loader.getResources(baseResource);
+         while (urls.hasMoreElements())
+         {
+            URL url = urls.nextElement();
+            undeployResourceBase(url, baseResource);
+         }
+      }
+      catch (IOException e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+
+   /**
+    * opposite of deployResourceBase()
+    *
+    *
+    *
+    * @param baseResource
+    * @throws DeploymentException
+    */
+   public void undeployResourceBase(Class baseResource) throws DeploymentException
+   {
+      String resource = baseResource.getName().replace('.', '/') + ".class";
+      undeployResourceBase(resource);
+   }
+   /**
+    * opposite of deployResource
+    *
+    * @param resource
+    * @throws DeploymentException
+    */
+   public void undeployResource(String resource) throws DeploymentException
+   {
+      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+      if (loader != null)
+         classLoader = loader;
+
+      URL url = classLoader.getResource(resource);
+      if (url == null)
+         throw new NullPointerException("Resource was null: " + resource);
+
+      undeploy(url);
+   }
+
+   public void undeploy(URL url) throws DeploymentException
+   {
+      VirtualFile vf = DeploymentGroup.getVirtualFile(url);
+      undeploy(vf);
+   }
+
+   public void undeploy(VirtualFile vf)
+           throws DeploymentException
+   {
+      mainDeployer.removeDeployment(vf.getName());
+      mainDeployer.process();
+   }
+
+   public void undeployDirectory(URL url, boolean recurse) throws DeploymentException, IOException
+   {
+      List<VirtualFile> files = DeploymentGroup.getDeployerDirUrls(null, url, recurse);
+      for (VirtualFile vf : files)
+         mainDeployer.removeDeployment(vf.getName());
+      mainDeployer.process();
+   }
+
+   public void undeployDirectoryFromResource(String resource, boolean recurse) throws DeploymentException, IOException
+   {
+      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+      if (loader != null) classLoader = loader;
+      List<VirtualFile> files = DeploymentGroup.getDeployerDirUrlsFromResource(null, classLoader, resource, recurse);
+      for (VirtualFile vf : files)
+         mainDeployer.removeDeployment(vf.getName());
+      mainDeployer.process();
+   }
+
+   public DeploymentGroup createDeploymentGroup()
+   {
+      DeploymentGroup group = new DeploymentGroup();
+      group.setClassLoader(loader);
+      group.setMainDeployer(mainDeployer);
+      group.setKernel(kernel);
+      return group;
+   }
+
+   public static void main(String[] args) throws Exception
+   {
+      getInstance().bootstrap();
+      for (String arg : args)
+      {
+         getInstance().scanClasspath(arg);
+      }
+      System.out.println("Running...");
+      Thread t = new Thread();
+      t.setDaemon(false);
+      t.start();
+   }
  }
\ No newline at end of file


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

Modified: trunk/embedded/src/main/java/org/jboss/embedded/ClassLoaderDeployer.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/ClassLoaderDeployer.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/ClassLoaderDeployer.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,40 +1,40 @@
-/*
- * 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.embedded;
-
-import org.jboss.deployers.spi.deployer.helpers.AbstractTopLevelClassLoaderDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision: 1.1 $
- */
-public class ClassLoaderDeployer extends AbstractTopLevelClassLoaderDeployer
-{
-   public ClassLoader createTopLevelClassLoader(DeploymentUnit unit) throws Exception
-   {
-      return Thread.currentThread().getContextClassLoader();
-   }
-}
+/*
+ * 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.embedded;
+
+import org.jboss.deployers.spi.deployer.helpers.AbstractTopLevelClassLoaderDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @author adrian at jboss.org
+ * @version $Revision: 1.1 $
+ */
+public class ClassLoaderDeployer extends AbstractTopLevelClassLoaderDeployer
+{
+   public ClassLoader createTopLevelClassLoader(DeploymentUnit unit) throws Exception
+   {
+      return Thread.currentThread().getContextClassLoader();
+   }
+}


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

Modified: trunk/embedded/src/main/java/org/jboss/embedded/DeploymentGroup.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/DeploymentGroup.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/DeploymentGroup.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,643 +1,643 @@
-/*
- * 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.embedded;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.jboss.deployers.client.spi.main.MainDeployer;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.structure.spi.main.MainDeployerStructure;
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
-import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
-import org.jboss.kernel.Kernel;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision: 1.1 $
- */
-public class DeploymentGroup
-{
-   private ArrayList<VFSDeployment> deployments = new ArrayList<VFSDeployment>();
-   protected MainDeployer mainDeployer;
-   protected Kernel kernel;
-   private VirtualFileFilter filter;
-   private ClassLoader classLoader;
-
-   public void setMainDeployer(MainDeployer mainDeployer)
-   {
-      this.mainDeployer = mainDeployer;
-   }
-
-   public void setKernel(Kernel kernel)
-   {
-      this.kernel = kernel;
-   }
-
-   /**
-    *
-    * File filter that will be used when scanning a directory
-    *
-    * @param filter
-    */
-   public void setFilter(VirtualFileFilter filter)
-   {
-      this.filter = filter;
-   }
-
-   public void setClassLoader(ClassLoader classLoader)
-   {
-      this.classLoader = classLoader;
-   }
-
-   /**
-    * A helper to find all deployments under a directory vf
-    * and add them to the supplied list.
-    *
-    * We may recurse.
-    */
-   private static void addDeployments(VirtualFileFilter filter, List<VirtualFile> list, VirtualFile root, boolean recurse)
-      throws IOException
-   {
-      List<VirtualFile> components = root.getChildren();
-
-      for (VirtualFile component : components)
-      {
-         // Filter the component regardless of its type
-         if( filter != null && filter.accepts(component) == false)
-            continue;
-         if (component.isLeaf())
-         {
-            list.add(component);
-         }
-         // TODO replace . in the name with isArchive() == false?
-         else if (component.getName().indexOf('.') == -1 && recurse)
-         {
-            // recurse if not '.' in name and recursive search is enabled
-            addDeployments(filter, list, component, true);
-         }
-         else
-         {
-            list.add(component);
-         }
-      }
-   }
-
-   /**
-    * Ask the mainDeployer to process the set of files you added to the group
-    * this will also check the processing
-    *
-    * @throws org.jboss.deployers.spi.DeploymentException
-    */
-   public void process() throws DeploymentException
-   {
-      mainDeployer.process();
-      mainDeployer.checkComplete();
-   }
-
-   /**
-    *  Ask the mainDeployer to undeploy the set of files in the group
-    *
-    * @throws org.jboss.deployers.spi.DeploymentException
-    */
-   public void undeploy() throws DeploymentException
-   {
-      for (VFSDeployment ctx : deployments)
-         mainDeployer.removeDeployment(ctx);
-      process();
-   }
-
-   /**
-    * Schedule a VirtualFile to be deployed
-    *
-    * @param vf
-    * @throws DeploymentException
-    */
-   public void add(VirtualFile vf) throws DeploymentException
-   {
-      VFSDeploymentFactory factory = VFSDeploymentFactory.getInstance();
-      VFSDeployment deployment = factory.createVFSDeployment(vf);
-      mainDeployer.addDeployment(deployment);
-      deployments.add(deployment);
-   }
-
-   /**
-    * schedules a URL to be deployed
-    *
-    * @param url
-    * @throws DeploymentException
-    */
-   public void add(URL url) throws DeploymentException
-   {
-      VirtualFile file = getVirtualFile(url);
-      add(file);
-   }
-
-   public static VirtualFile getVirtualFile(URL url)
-           throws DeploymentException
-   {
-      VirtualFile file = null;
-      try
-      {
-         file = VFS.getRoot(url);
-      }
-      catch (IOException e)
-      {
-         throw new DeploymentException("Unable to get VirtualFile for url: " + url, e);
-      }
-      return file;
-   }
-
-   /**
-    * schedules a list of virtual files to be deployed
-    *
-    * @param vfs
-    * @throws DeploymentException
-    */
-   public void addVirtualFiles(List<VirtualFile> vfs) throws DeploymentException
-   {
-      for (VirtualFile vf : vfs)
-      {
-         add(vf);
-      }
-   }
-
-   /**
-    * schedules a list of urls to be deployed
-    *
-    * @param urls
-    * @throws DeploymentException
-    */
-   public void addUrls(List<URL> urls) throws DeploymentException
-   {
-      for (URL url : urls)
-      {
-         add(url);
-      }
-   }
-
-   /**
-    * Scan all paths/jars in Java CLasspath (found with java.class.path System Property)
-    * schedule these jars to be deployed
-    *
-    * @throws org.jboss.deployers.spi.DeploymentException
-    */
-   public void addClasspath() throws DeploymentException
-   {
-      addUrls(getClassPaths());
-   }
-
-   public static List<URL> getClassPaths() throws DeploymentException
-   {
-      List<URL> list = new ArrayList<URL>();
-      String classpath = System.getProperty("java.class.path");
-      StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);
-
-      while (tokenizer.hasMoreTokens())
-      {
-         String path = tokenizer.nextToken();
-         File fp = new File(path);
-         if (!fp.exists()) throw new DeploymentException("File in java.class.path does not exist: " + fp);
-         try
-         {
-            list.add(fp.toURL());
-         }
-         catch (MalformedURLException e)
-         {
-            throw new DeploymentException(e);
-         }
-      }
-      return list;
-   }
-
-   /**
-    * Scan Java Classpath (found with java.class.path)
-    * for a specified list of files you want to deploy
-    *
-    * The files listed should be only the filename.  Do not put relative or absolute paths in filenames.
-    * i.e. "myejbs.jar, my-beans.xml"
-    *
-    * @param paths comma delimited list of files
-    * @throws org.jboss.deployers.spi.DeploymentException
-    */
-   public void addClasspath(String paths) throws DeploymentException
-   {
-      List<URL> urls = getClassPaths(paths);
-      addUrls(urls);
-   }
-
-   public static List<URL> getClassPaths(String paths) throws DeploymentException
-   {
-      ArrayList<URL> list = new ArrayList<URL>();
-
-      String classpath = System.getProperty("java.class.path");
-      StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);
-      String[] split = paths.split(",");
-      for (int i = 0; i < split.length; i++)
-      {
-         split[i] = split[i].trim();
-      }
-
-      while (tokenizer.hasMoreTokens())
-      {
-         String path = tokenizer.nextToken().trim();
-         boolean found = false;
-         for (String wantedPath : split)
-         {
-            if (path.endsWith(File.separator + wantedPath))
-            {
-               found = true;
-               break;
-            }
-         }
-         if (!found)
-            continue;
-
-         File fp = new File(path);
-         if (!fp.exists())
-            throw new DeploymentException("File in java.class.path does not exists: " + fp);
-
-         try
-         {
-            list.add(fp.toURL());
-         }
-         catch (MalformedURLException e)
-         {
-            throw new DeploymentException(e);
-         }
-      }
-      return list;
-   }
-
-   /**
-    * Search for the resource using the group's configured classloader
-    * if no classloader, then Thread.currentThread().getContextClassLoader() is used.
-    *    classLoader.getResource(String resource)
-    *
-    * Schedule the resource to be deployed.
-    *
-    * @param resource
-    * @throws DeploymentException
-    * @throws NullPointerException
-    */
-   public void addResource(String resource) throws DeploymentException, NullPointerException
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      if (classLoader != null)
-         loader = classLoader;
-
-      URL url = loader.getResource(resource);
-      if (url == null)
-         throw new NullPointerException("Resource was null: " + resource);
-
-      add(url);
-   }
-
-   /**
-    * Deploy the classpath directory or .jar file a classloader resource is located in.
-    *
-    * i.e.
-    *
-    * classpath is "/home/wburke/lib/tutorial.jar"
-    * tutorial.jar has "META-INF/persistence.xml" resource within it.
-    *
-    * addResourceBase("META-INF/persistence.xml") will try and deploy tutorial.jar
-    *
-    *
-    * @param baseResource
-    * @throws DeploymentException
-    */
-   public void addResourceBase(String baseResource) throws DeploymentException
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      if (classLoader != null) loader = classLoader;
-      URL url = loader.getResource(baseResource);
-      if (url == null) throw new RuntimeException("Could not find baseResource: " + baseResource);
-      addBaseResource(url, baseResource);
-
-
-   }
-
-   protected void addBaseResource(URL url, String baseResource)
-           throws DeploymentException
-   {
-      String urlString = url.toString();
-      int idx = urlString.lastIndexOf(baseResource);
-      urlString = urlString.substring(0, idx);
-      URL deployUrl = null;
-      try
-      {
-         deployUrl = new URL(urlString);
-      }
-      catch (MalformedURLException e)
-      {
-         throw new RuntimeException(e);
-      }
-      add(deployUrl);
-   }
-
-   /**
-    * Deploy the classpath directories or .jar files a classloader resource is located in.
-    * ClassLoader.getResources() is used to find the base resources.
-    *
-    * i.e.
-    *
-    * classpath is "/home/wburke/lib/tutorial.jar:/home/wburke/lib/pu.jar"
-    * tutorial.jar and pu.jar has "META-INF/persistence.xml" resource within it.
-    *
-    * addResourceBases("META-INF/persistence.xml") will try and deploy tutorial.jar  and pu.jar because
-    * the both have the META-INF/persistence.xml resource within them.
-    *
-    *
-    * @param baseResource
-    * @throws DeploymentException
-    */
-   public void addResourceBases(String baseResource) throws DeploymentException
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      if (classLoader != null) loader = classLoader;
-      try
-      {
-         Enumeration<URL> urls = loader.getResources(baseResource);
-         while (urls.hasMoreElements())
-         {
-            URL url = urls.nextElement();
-            addBaseResource(url, baseResource);
-         }
-      }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   /**
-    * Find the .class file resource of provided class
-    * Return a URL pointing to the classpath the resource is located in.
-    *
-    * i.e.
-    *
-    * classpath is "/home/wburke/lib/tutorial.jar"
-    * tutorial.jar has "META-INF/persistence.xml" resource within it.
-    *
-    * addResourceBase("META-INF/persistence.xml") will try and deploy tutorial.jar
-    *
-    *
-    * @param baseResource
-    * @throws DeploymentException
-    */
-   public void addResourceBase(Class baseResource) throws DeploymentException
-   {
-      String resource = baseResource.getName().replace('.', '/') + ".class";
-      addResourceBase(resource);
-   }
-
-   /**
-    * Search for resources using the group's configured classloader
-    * if no classloader, then Thread.currentThread().getContextClassLoader() is used.
-    *    classLoader.getResources(String resource)
-    *
-    * Schedule the resource to be deployed.
-    *
-    * @param resource
-    * @throws DeploymentException
-    * @throws IOException
-    */
-   public void addMultipleResources(String resource) throws DeploymentException, IOException
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      if (classLoader != null) loader = classLoader;
-      Enumeration<URL> urls = loader.getResources(resource);
-      while (urls.hasMoreElements())
-      {
-         add(urls.nextElement());
-      }
-   }
-
-   /**
-    * Searches for a directory as described in the  getDirFromResource() method of this class.
-    *
-    * schedules all possible files in directory to be deployed
-    *
-    *
-    * @param resource
-    * @param recurse whether or not to recurse child directories
-    * @throws DeploymentException
-    * @throws IOException
-    */
-   public void addDirectoryByResource(String resource, boolean recurse) throws DeploymentException, IOException
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      if (classLoader != null) loader = classLoader;
-      List<VirtualFile> files = getDeployerDirUrlsFromResource(filter, loader, resource, recurse);
-      addVirtualFiles(files);
-   }
-
-   /**
-    * Searches for a file based on the location of an existing classloader resource
-    * as described in the  getDirFromResource() method of this class.
-    *
-    * schedules this particular file for deployment
-    *
-    *
-    * @param resource
-    * @throws DeploymentException
-    * @throws IOException
-    */
-   public void addFileByResource(String resource) throws DeploymentException, IOException
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      if (classLoader != null) loader = classLoader;
-      URL url = getDirFromResource(loader, resource);
-      if (url == null)
-      {
-         throw new DeploymentException("Unable to find file from resource: " + resource);
-      }
-      String urlStr = url.toString();
-      if (urlStr.endsWith("/"))
-      {
-         urlStr = urlStr.substring(0, urlStr.length() -1);
-      }
-      url = new URL(urlStr);
-      add(url);
-   }
-
-   public void addDirectory(URL directory, boolean recurse) throws DeploymentException, IOException
-   {
-      addVirtualFiles(getDeployerDirUrls(filter, directory, recurse));
-   }
-
-   /**
-    * Get the deployment units
-    * 
-    * @return the deployment units
-    * @throws IllegalStateException when the units cannot be located
-    */
-   public List<DeploymentUnit> getDeploymentUnits()
-   {
-      ArrayList<DeploymentUnit> result = new ArrayList<DeploymentUnit>();
-      MainDeployerStructure structure = (MainDeployerStructure) mainDeployer;
-      for (VFSDeployment deployment : deployments)
-      {
-         DeploymentUnit unit = structure.getDeploymentUnit(deployment.getName());
-         if (unit == null)
-            throw new IllegalStateException("DeploymentUnit not found " + deployment.getName());
-         result.add(unit);
-      }
-      return result;
-   }
-
-   public List<VFSDeployment> getDeployments()
-   {
-      return deployments;
-   }
-
-   public static List<VirtualFile> getDeployerDirUrlsFromResource(VirtualFileFilter filter, ClassLoader loader, String resource, boolean recurse)
-           throws DeploymentException, IOException
-   {
-      URL url = getDirFromResource(loader, resource);
-      if (url == null)
-      {
-         throw new DeploymentException("Unable to find deployDir from resource: " + resource);
-      }
-      List<VirtualFile> files = getDeployerDirUrls(filter, url, recurse);
-      return files;
-   }
-
-   public static List<VirtualFile> getDeployerDirUrls(VirtualFileFilter filter, URL url, boolean recurse)
-           throws DeploymentException, IOException
-   {
-      VirtualFile file = null;
-      try
-      {
-         file = VFS.getRoot(url);
-      }
-      catch (Exception e)
-      {
-         throw new DeploymentException("Unable to find deployDir from url: " + url, e);
-      }
-      List<VirtualFile> files = new ArrayList<VirtualFile>();
-      addDeployments(filter, files, file, recurse);
-      return files;
-   }
-
-   /**
-    * Find the directory that contains a given resource.
-    * <p/>
-    * The '.' character can be used to specify the current directory.
-    * The '..' string can be used to specify a higher relative path
-    * <p/>
-    * i.e.
-    * <p/>
-    * getDirFromResource(loader, "org/jboss/Test.class")
-    * file:/<root>/org/jboss/
-    * <p/>
-    * getDirFromResource(loader, "org/jboss/Test.class/..")
-    * file:/<root>/org/
-    * <p/>
-    * getDirFromResource(loader, "org/jboss/Test.class/../acme")
-    * file:/<root>/org/acme/
-    * <p/>
-    * getDirFromResource(loader, "org/jboss/Test.class/./embedded")
-    * file:/<root>/org/jboss/embedded/
-    *
-    * @param loader
-    * @param resource
-    * @return the url
-    */
-   public static URL getDirFromResource(ClassLoader loader, String resource)
-   {
-      int idx = resource.indexOf("/.");
-      String base = resource;
-      String relative = null;
-      if (idx != -1)
-      {
-         base = resource.substring(0, idx);
-         relative = resource.substring(idx + 1);
-      }
-      URL url = loader.getResource(base);
-      if (url == null) return null;
-      String urlAsString = url.toString();
-      String[] paths = urlAsString.split("/");
-      int last = paths.length - 2;
-      if (relative != null)
-      {
-         String[] relativePaths = relative.split("/");
-         int relativeStart = 0;
-         for (String relativePath : relativePaths)
-         {
-            if (relativePath.equals(".."))
-            {
-               last--;
-               relativeStart++;
-            }
-            else if (relativePath.equals("."))
-            {
-               relativeStart++;
-            }
-            else
-            {
-               break;
-            }
-         }
-         urlAsString = "";
-         for (int i = 0; i <= last; i++)
-         {
-            urlAsString += paths[i] + "/";
-         }
-         for (int i = relativeStart; i < relativePaths.length; i++)
-         {
-            urlAsString += relativePaths[i] + "/";
-         }
-      }
-      else
-      {
-         urlAsString = "";
-         for (int i = 0; i <= last; i++)
-         {
-            urlAsString += paths[i] + "/";
-         }
-      }
-      try
-      {
-         url = new URL(urlAsString);
-      }
-      catch (MalformedURLException e)
-      {
-         throw new RuntimeException(e);
-      }
-      return url;
-   }
-}
+/*
+ * 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.embedded;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.structure.spi.main.MainDeployerStructure;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.kernel.Kernel;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @author adrian at jboss.org
+ * @version $Revision: 1.1 $
+ */
+public class DeploymentGroup
+{
+   private ArrayList<VFSDeployment> deployments = new ArrayList<VFSDeployment>();
+   protected MainDeployer mainDeployer;
+   protected Kernel kernel;
+   private VirtualFileFilter filter;
+   private ClassLoader classLoader;
+
+   public void setMainDeployer(MainDeployer mainDeployer)
+   {
+      this.mainDeployer = mainDeployer;
+   }
+
+   public void setKernel(Kernel kernel)
+   {
+      this.kernel = kernel;
+   }
+
+   /**
+    *
+    * File filter that will be used when scanning a directory
+    *
+    * @param filter
+    */
+   public void setFilter(VirtualFileFilter filter)
+   {
+      this.filter = filter;
+   }
+
+   public void setClassLoader(ClassLoader classLoader)
+   {
+      this.classLoader = classLoader;
+   }
+
+   /**
+    * A helper to find all deployments under a directory vf
+    * and add them to the supplied list.
+    *
+    * We may recurse.
+    */
+   private static void addDeployments(VirtualFileFilter filter, List<VirtualFile> list, VirtualFile root, boolean recurse)
+      throws IOException
+   {
+      List<VirtualFile> components = root.getChildren();
+
+      for (VirtualFile component : components)
+      {
+         // Filter the component regardless of its type
+         if( filter != null && filter.accepts(component) == false)
+            continue;
+         if (component.isLeaf())
+         {
+            list.add(component);
+         }
+         // TODO replace . in the name with isArchive() == false?
+         else if (component.getName().indexOf('.') == -1 && recurse)
+         {
+            // recurse if not '.' in name and recursive search is enabled
+            addDeployments(filter, list, component, true);
+         }
+         else
+         {
+            list.add(component);
+         }
+      }
+   }
+
+   /**
+    * Ask the mainDeployer to process the set of files you added to the group
+    * this will also check the processing
+    *
+    * @throws org.jboss.deployers.spi.DeploymentException
+    */
+   public void process() throws DeploymentException
+   {
+      mainDeployer.process();
+      mainDeployer.checkComplete();
+   }
+
+   /**
+    *  Ask the mainDeployer to undeploy the set of files in the group
+    *
+    * @throws org.jboss.deployers.spi.DeploymentException
+    */
+   public void undeploy() throws DeploymentException
+   {
+      for (VFSDeployment ctx : deployments)
+         mainDeployer.removeDeployment(ctx);
+      process();
+   }
+
+   /**
+    * Schedule a VirtualFile to be deployed
+    *
+    * @param vf
+    * @throws DeploymentException
+    */
+   public void add(VirtualFile vf) throws DeploymentException
+   {
+      VFSDeploymentFactory factory = VFSDeploymentFactory.getInstance();
+      VFSDeployment deployment = factory.createVFSDeployment(vf);
+      mainDeployer.addDeployment(deployment);
+      deployments.add(deployment);
+   }
+
+   /**
+    * schedules a URL to be deployed
+    *
+    * @param url
+    * @throws DeploymentException
+    */
+   public void add(URL url) throws DeploymentException
+   {
+      VirtualFile file = getVirtualFile(url);
+      add(file);
+   }
+
+   public static VirtualFile getVirtualFile(URL url)
+           throws DeploymentException
+   {
+      VirtualFile file = null;
+      try
+      {
+         file = VFS.getRoot(url);
+      }
+      catch (IOException e)
+      {
+         throw new DeploymentException("Unable to get VirtualFile for url: " + url, e);
+      }
+      return file;
+   }
+
+   /**
+    * schedules a list of virtual files to be deployed
+    *
+    * @param vfs
+    * @throws DeploymentException
+    */
+   public void addVirtualFiles(List<VirtualFile> vfs) throws DeploymentException
+   {
+      for (VirtualFile vf : vfs)
+      {
+         add(vf);
+      }
+   }
+
+   /**
+    * schedules a list of urls to be deployed
+    *
+    * @param urls
+    * @throws DeploymentException
+    */
+   public void addUrls(List<URL> urls) throws DeploymentException
+   {
+      for (URL url : urls)
+      {
+         add(url);
+      }
+   }
+
+   /**
+    * Scan all paths/jars in Java CLasspath (found with java.class.path System Property)
+    * schedule these jars to be deployed
+    *
+    * @throws org.jboss.deployers.spi.DeploymentException
+    */
+   public void addClasspath() throws DeploymentException
+   {
+      addUrls(getClassPaths());
+   }
+
+   public static List<URL> getClassPaths() throws DeploymentException
+   {
+      List<URL> list = new ArrayList<URL>();
+      String classpath = System.getProperty("java.class.path");
+      StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);
+
+      while (tokenizer.hasMoreTokens())
+      {
+         String path = tokenizer.nextToken();
+         File fp = new File(path);
+         if (!fp.exists()) throw new DeploymentException("File in java.class.path does not exist: " + fp);
+         try
+         {
+            list.add(fp.toURL());
+         }
+         catch (MalformedURLException e)
+         {
+            throw new DeploymentException(e);
+         }
+      }
+      return list;
+   }
+
+   /**
+    * Scan Java Classpath (found with java.class.path)
+    * for a specified list of files you want to deploy
+    *
+    * The files listed should be only the filename.  Do not put relative or absolute paths in filenames.
+    * i.e. "myejbs.jar, my-beans.xml"
+    *
+    * @param paths comma delimited list of files
+    * @throws org.jboss.deployers.spi.DeploymentException
+    */
+   public void addClasspath(String paths) throws DeploymentException
+   {
+      List<URL> urls = getClassPaths(paths);
+      addUrls(urls);
+   }
+
+   public static List<URL> getClassPaths(String paths) throws DeploymentException
+   {
+      ArrayList<URL> list = new ArrayList<URL>();
+
+      String classpath = System.getProperty("java.class.path");
+      StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);
+      String[] split = paths.split(",");
+      for (int i = 0; i < split.length; i++)
+      {
+         split[i] = split[i].trim();
+      }
+
+      while (tokenizer.hasMoreTokens())
+      {
+         String path = tokenizer.nextToken().trim();
+         boolean found = false;
+         for (String wantedPath : split)
+         {
+            if (path.endsWith(File.separator + wantedPath))
+            {
+               found = true;
+               break;
+            }
+         }
+         if (!found)
+            continue;
+
+         File fp = new File(path);
+         if (!fp.exists())
+            throw new DeploymentException("File in java.class.path does not exists: " + fp);
+
+         try
+         {
+            list.add(fp.toURL());
+         }
+         catch (MalformedURLException e)
+         {
+            throw new DeploymentException(e);
+         }
+      }
+      return list;
+   }
+
+   /**
+    * Search for the resource using the group's configured classloader
+    * if no classloader, then Thread.currentThread().getContextClassLoader() is used.
+    *    classLoader.getResource(String resource)
+    *
+    * Schedule the resource to be deployed.
+    *
+    * @param resource
+    * @throws DeploymentException
+    * @throws NullPointerException
+    */
+   public void addResource(String resource) throws DeploymentException, NullPointerException
+   {
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      if (classLoader != null)
+         loader = classLoader;
+
+      URL url = loader.getResource(resource);
+      if (url == null)
+         throw new NullPointerException("Resource was null: " + resource);
+
+      add(url);
+   }
+
+   /**
+    * Deploy the classpath directory or .jar file a classloader resource is located in.
+    *
+    * i.e.
+    *
+    * classpath is "/home/wburke/lib/tutorial.jar"
+    * tutorial.jar has "META-INF/persistence.xml" resource within it.
+    *
+    * addResourceBase("META-INF/persistence.xml") will try and deploy tutorial.jar
+    *
+    *
+    * @param baseResource
+    * @throws DeploymentException
+    */
+   public void addResourceBase(String baseResource) throws DeploymentException
+   {
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      if (classLoader != null) loader = classLoader;
+      URL url = loader.getResource(baseResource);
+      if (url == null) throw new RuntimeException("Could not find baseResource: " + baseResource);
+      addBaseResource(url, baseResource);
+
+
+   }
+
+   protected void addBaseResource(URL url, String baseResource)
+           throws DeploymentException
+   {
+      String urlString = url.toString();
+      int idx = urlString.lastIndexOf(baseResource);
+      urlString = urlString.substring(0, idx);
+      URL deployUrl = null;
+      try
+      {
+         deployUrl = new URL(urlString);
+      }
+      catch (MalformedURLException e)
+      {
+         throw new RuntimeException(e);
+      }
+      add(deployUrl);
+   }
+
+   /**
+    * Deploy the classpath directories or .jar files a classloader resource is located in.
+    * ClassLoader.getResources() is used to find the base resources.
+    *
+    * i.e.
+    *
+    * classpath is "/home/wburke/lib/tutorial.jar:/home/wburke/lib/pu.jar"
+    * tutorial.jar and pu.jar has "META-INF/persistence.xml" resource within it.
+    *
+    * addResourceBases("META-INF/persistence.xml") will try and deploy tutorial.jar  and pu.jar because
+    * the both have the META-INF/persistence.xml resource within them.
+    *
+    *
+    * @param baseResource
+    * @throws DeploymentException
+    */
+   public void addResourceBases(String baseResource) throws DeploymentException
+   {
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      if (classLoader != null) loader = classLoader;
+      try
+      {
+         Enumeration<URL> urls = loader.getResources(baseResource);
+         while (urls.hasMoreElements())
+         {
+            URL url = urls.nextElement();
+            addBaseResource(url, baseResource);
+         }
+      }
+      catch (IOException e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+
+   /**
+    * Find the .class file resource of provided class
+    * Return a URL pointing to the classpath the resource is located in.
+    *
+    * i.e.
+    *
+    * classpath is "/home/wburke/lib/tutorial.jar"
+    * tutorial.jar has "META-INF/persistence.xml" resource within it.
+    *
+    * addResourceBase("META-INF/persistence.xml") will try and deploy tutorial.jar
+    *
+    *
+    * @param baseResource
+    * @throws DeploymentException
+    */
+   public void addResourceBase(Class baseResource) throws DeploymentException
+   {
+      String resource = baseResource.getName().replace('.', '/') + ".class";
+      addResourceBase(resource);
+   }
+
+   /**
+    * Search for resources using the group's configured classloader
+    * if no classloader, then Thread.currentThread().getContextClassLoader() is used.
+    *    classLoader.getResources(String resource)
+    *
+    * Schedule the resource to be deployed.
+    *
+    * @param resource
+    * @throws DeploymentException
+    * @throws IOException
+    */
+   public void addMultipleResources(String resource) throws DeploymentException, IOException
+   {
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      if (classLoader != null) loader = classLoader;
+      Enumeration<URL> urls = loader.getResources(resource);
+      while (urls.hasMoreElements())
+      {
+         add(urls.nextElement());
+      }
+   }
+
+   /**
+    * Searches for a directory as described in the  getDirFromResource() method of this class.
+    *
+    * schedules all possible files in directory to be deployed
+    *
+    *
+    * @param resource
+    * @param recurse whether or not to recurse child directories
+    * @throws DeploymentException
+    * @throws IOException
+    */
+   public void addDirectoryByResource(String resource, boolean recurse) throws DeploymentException, IOException
+   {
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      if (classLoader != null) loader = classLoader;
+      List<VirtualFile> files = getDeployerDirUrlsFromResource(filter, loader, resource, recurse);
+      addVirtualFiles(files);
+   }
+
+   /**
+    * Searches for a file based on the location of an existing classloader resource
+    * as described in the  getDirFromResource() method of this class.
+    *
+    * schedules this particular file for deployment
+    *
+    *
+    * @param resource
+    * @throws DeploymentException
+    * @throws IOException
+    */
+   public void addFileByResource(String resource) throws DeploymentException, IOException
+   {
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      if (classLoader != null) loader = classLoader;
+      URL url = getDirFromResource(loader, resource);
+      if (url == null)
+      {
+         throw new DeploymentException("Unable to find file from resource: " + resource);
+      }
+      String urlStr = url.toString();
+      if (urlStr.endsWith("/"))
+      {
+         urlStr = urlStr.substring(0, urlStr.length() -1);
+      }
+      url = new URL(urlStr);
+      add(url);
+   }
+
+   public void addDirectory(URL directory, boolean recurse) throws DeploymentException, IOException
+   {
+      addVirtualFiles(getDeployerDirUrls(filter, directory, recurse));
+   }
+
+   /**
+    * Get the deployment units
+    * 
+    * @return the deployment units
+    * @throws IllegalStateException when the units cannot be located
+    */
+   public List<DeploymentUnit> getDeploymentUnits()
+   {
+      ArrayList<DeploymentUnit> result = new ArrayList<DeploymentUnit>();
+      MainDeployerStructure structure = (MainDeployerStructure) mainDeployer;
+      for (VFSDeployment deployment : deployments)
+      {
+         DeploymentUnit unit = structure.getDeploymentUnit(deployment.getName());
+         if (unit == null)
+            throw new IllegalStateException("DeploymentUnit not found " + deployment.getName());
+         result.add(unit);
+      }
+      return result;
+   }
+
+   public List<VFSDeployment> getDeployments()
+   {
+      return deployments;
+   }
+
+   public static List<VirtualFile> getDeployerDirUrlsFromResource(VirtualFileFilter filter, ClassLoader loader, String resource, boolean recurse)
+           throws DeploymentException, IOException
+   {
+      URL url = getDirFromResource(loader, resource);
+      if (url == null)
+      {
+         throw new DeploymentException("Unable to find deployDir from resource: " + resource);
+      }
+      List<VirtualFile> files = getDeployerDirUrls(filter, url, recurse);
+      return files;
+   }
+
+   public static List<VirtualFile> getDeployerDirUrls(VirtualFileFilter filter, URL url, boolean recurse)
+           throws DeploymentException, IOException
+   {
+      VirtualFile file = null;
+      try
+      {
+         file = VFS.getRoot(url);
+      }
+      catch (Exception e)
+      {
+         throw new DeploymentException("Unable to find deployDir from url: " + url, e);
+      }
+      List<VirtualFile> files = new ArrayList<VirtualFile>();
+      addDeployments(filter, files, file, recurse);
+      return files;
+   }
+
+   /**
+    * Find the directory that contains a given resource.
+    * <p/>
+    * The '.' character can be used to specify the current directory.
+    * The '..' string can be used to specify a higher relative path
+    * <p/>
+    * i.e.
+    * <p/>
+    * getDirFromResource(loader, "org/jboss/Test.class")
+    * file:/<root>/org/jboss/
+    * <p/>
+    * getDirFromResource(loader, "org/jboss/Test.class/..")
+    * file:/<root>/org/
+    * <p/>
+    * getDirFromResource(loader, "org/jboss/Test.class/../acme")
+    * file:/<root>/org/acme/
+    * <p/>
+    * getDirFromResource(loader, "org/jboss/Test.class/./embedded")
+    * file:/<root>/org/jboss/embedded/
+    *
+    * @param loader
+    * @param resource
+    * @return the url
+    */
+   public static URL getDirFromResource(ClassLoader loader, String resource)
+   {
+      int idx = resource.indexOf("/.");
+      String base = resource;
+      String relative = null;
+      if (idx != -1)
+      {
+         base = resource.substring(0, idx);
+         relative = resource.substring(idx + 1);
+      }
+      URL url = loader.getResource(base);
+      if (url == null) return null;
+      String urlAsString = url.toString();
+      String[] paths = urlAsString.split("/");
+      int last = paths.length - 2;
+      if (relative != null)
+      {
+         String[] relativePaths = relative.split("/");
+         int relativeStart = 0;
+         for (String relativePath : relativePaths)
+         {
+            if (relativePath.equals(".."))
+            {
+               last--;
+               relativeStart++;
+            }
+            else if (relativePath.equals("."))
+            {
+               relativeStart++;
+            }
+            else
+            {
+               break;
+            }
+         }
+         urlAsString = "";
+         for (int i = 0; i <= last; i++)
+         {
+            urlAsString += paths[i] + "/";
+         }
+         for (int i = relativeStart; i < relativePaths.length; i++)
+         {
+            urlAsString += relativePaths[i] + "/";
+         }
+      }
+      else
+      {
+         urlAsString = "";
+         for (int i = 0; i <= last; i++)
+         {
+            urlAsString += paths[i] + "/";
+         }
+      }
+      try
+      {
+         url = new URL(urlAsString);
+      }
+      catch (MalformedURLException e)
+      {
+         throw new RuntimeException(e);
+      }
+      return url;
+   }
+}


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

Modified: trunk/embedded/src/main/java/org/jboss/embedded/DeploymentScanner.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/DeploymentScanner.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/DeploymentScanner.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,118 +1,118 @@
-/*
- * 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.embedded;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.List;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.logging.Logger;
-
-/**
- * Bean so that you can create a DeploymentGroup from the Microcontainer
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class DeploymentScanner extends DeploymentGroup
-{
-   private static final Logger log = Logger.getLogger(DeploymentScanner.class);
-
-   private List<URL> urls;
-   private List<String> resources;
-   private List<String> multiple;
-   private List<String> dirs;
-   private List<String> filesByResource;
-
-   public void setUrls(List<URL> urls) throws DeploymentException
-   {
-      this.urls = urls;
-   }
-
-   public void setResources(List<String> resources) throws DeploymentException, NullPointerException
-   {
-      this.resources = resources;
-   }
-
-   public void setMultipleResources(List<String> resources) throws DeploymentException, IOException
-   {
-      this.multiple = resources;
-   }
-
-   public void setDirectoriesByResource(List<String> resources) throws DeploymentException, IOException
-   {
-      dirs = resources;
-   }
-
-   public void setFilesByResource(List<String> filesByResource)
-   {
-      this.filesByResource = filesByResource;
-   }
-
-   public void start() throws Exception
-   {
-      try
-      {
-         if (urls != null) addUrls(urls);
-         if (resources != null)
-         {
-            for (String resource : resources)
-            {
-               addResource(resource);
-            }
-         }
-         if (multiple != null)
-         {
-            for (String resource : multiple)
-            {
-               addMultipleResources(resource);
-            }
-         }
-         if (dirs != null)
-         {
-            for (String resource : dirs)
-            {
-               addDirectoryByResource(resource, true);
-            }
-         }
-         if (filesByResource != null)
-         {
-            for (String resource : filesByResource)
-            {
-               addFileByResource(resource);
-            }
-         }
-         mainDeployer.process();
-      }
-      catch (Exception ex)
-      {
-         log.error("Failed to deploy", ex);
-         throw ex;
-      }
-   }
-
-   public void stop() throws DeploymentException
-   {
-      undeploy();
-   }
-}
+/*
+ * 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.embedded;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.logging.Logger;
+
+/**
+ * Bean so that you can create a DeploymentGroup from the Microcontainer
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class DeploymentScanner extends DeploymentGroup
+{
+   private static final Logger log = Logger.getLogger(DeploymentScanner.class);
+
+   private List<URL> urls;
+   private List<String> resources;
+   private List<String> multiple;
+   private List<String> dirs;
+   private List<String> filesByResource;
+
+   public void setUrls(List<URL> urls) throws DeploymentException
+   {
+      this.urls = urls;
+   }
+
+   public void setResources(List<String> resources) throws DeploymentException, NullPointerException
+   {
+      this.resources = resources;
+   }
+
+   public void setMultipleResources(List<String> resources) throws DeploymentException, IOException
+   {
+      this.multiple = resources;
+   }
+
+   public void setDirectoriesByResource(List<String> resources) throws DeploymentException, IOException
+   {
+      dirs = resources;
+   }
+
+   public void setFilesByResource(List<String> filesByResource)
+   {
+      this.filesByResource = filesByResource;
+   }
+
+   public void start() throws Exception
+   {
+      try
+      {
+         if (urls != null) addUrls(urls);
+         if (resources != null)
+         {
+            for (String resource : resources)
+            {
+               addResource(resource);
+            }
+         }
+         if (multiple != null)
+         {
+            for (String resource : multiple)
+            {
+               addMultipleResources(resource);
+            }
+         }
+         if (dirs != null)
+         {
+            for (String resource : dirs)
+            {
+               addDirectoryByResource(resource, true);
+            }
+         }
+         if (filesByResource != null)
+         {
+            for (String resource : filesByResource)
+            {
+               addFileByResource(resource);
+            }
+         }
+         mainDeployer.process();
+      }
+      catch (Exception ex)
+      {
+         log.error("Failed to deploy", ex);
+         throw ex;
+      }
+   }
+
+   public void stop() throws DeploymentException
+   {
+      undeploy();
+   }
+}


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

Modified: trunk/embedded/src/main/java/org/jboss/embedded/ServletContextResourceScanner.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/ServletContextResourceScanner.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/ServletContextResourceScanner.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,90 +1,90 @@
-/*
- * 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.embedded;
-
-import java.net.URL;
-import java.util.StringTokenizer;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-import org.jboss.deployers.spi.DeploymentException;
-
-/**
- * This listener takes in the init parameter "jboss.embedded.resources"
- * which is a comma delimited list of ServletContext resources that you want
- * deployed within the WAR file.  i.e. "/WEB-INF/lib/mybeans.jar"
- *
- * When the WAR is initialized, those referenced resources will be deployed.
- * When the WAR is destroyed, those referenced resources are undeployed from the
- * embedded kernel.
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 44597 $
- */
-public class ServletContextResourceScanner implements ServletContextListener
-{
-   private DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-
-   public void contextInitialized(ServletContextEvent servletContextEvent)
-   {
-      ServletContext servletContext = servletContextEvent.getServletContext();
-      String resources = servletContext.getInitParameter("jboss.embedded.resources");
-
-      if (resources == null) throw new RuntimeException("You must specify a resources parameter to the ServletContextResourceScanner");
-
-      StringTokenizer tokenizer = new StringTokenizer(resources, ",");
-      while (tokenizer.hasMoreTokens())
-      {
-         String token = tokenizer.nextToken().trim();
-         try
-         {
-            URL resource = servletContext.getResource(token);
-            group.add(resource);
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException("Unable to add servlet resource to deloyer: " + token, e);
-         }
-      }
-      try
-      {
-         group.process();
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Failed to deploy servlet resources: " + resources, e);
-      }
-   }
-
-   public void contextDestroyed(ServletContextEvent servletContextEvent)
-   {
-      try
-      {
-         group.undeploy();
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-}
+/*
+ * 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.embedded;
+
+import java.net.URL;
+import java.util.StringTokenizer;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.jboss.deployers.spi.DeploymentException;
+
+/**
+ * This listener takes in the init parameter "jboss.embedded.resources"
+ * which is a comma delimited list of ServletContext resources that you want
+ * deployed within the WAR file.  i.e. "/WEB-INF/lib/mybeans.jar"
+ *
+ * When the WAR is initialized, those referenced resources will be deployed.
+ * When the WAR is destroyed, those referenced resources are undeployed from the
+ * embedded kernel.
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 44597 $
+ */
+public class ServletContextResourceScanner implements ServletContextListener
+{
+   private DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+
+   public void contextInitialized(ServletContextEvent servletContextEvent)
+   {
+      ServletContext servletContext = servletContextEvent.getServletContext();
+      String resources = servletContext.getInitParameter("jboss.embedded.resources");
+
+      if (resources == null) throw new RuntimeException("You must specify a resources parameter to the ServletContextResourceScanner");
+
+      StringTokenizer tokenizer = new StringTokenizer(resources, ",");
+      while (tokenizer.hasMoreTokens())
+      {
+         String token = tokenizer.nextToken().trim();
+         try
+         {
+            URL resource = servletContext.getResource(token);
+            group.add(resource);
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException("Unable to add servlet resource to deloyer: " + token, e);
+         }
+      }
+      try
+      {
+         group.process();
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Failed to deploy servlet resources: " + resources, e);
+      }
+   }
+
+   public void contextDestroyed(ServletContextEvent servletContextEvent)
+   {
+      try
+      {
+         group.undeploy();
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+}


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

Modified: trunk/embedded/src/main/java/org/jboss/embedded/WebInfLibScanner.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/WebInfLibScanner.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/WebInfLibScanner.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,89 +1,89 @@
-/*
- * 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.embedded;
-
-import java.net.URL;
-import java.util.Set;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.logging.Logger;
-
-/**
- * Deploy all jars in WEB-INF/lib.  These jars are undeployed at WAR destruction
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 44597 $
- */
-public class WebInfLibScanner implements ServletContextListener
-{
-   private static final Logger log = Logger.getLogger(WebInfLibScanner.class);
-
-   private DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-
-   public void contextInitialized(ServletContextEvent servletContextEvent)
-   {
-      scan(servletContextEvent, "/WEB-INF/lib");
-   }
-
-   protected void scan(ServletContextEvent servletContextEvent, String path)
-   {
-      try
-      {
-         ServletContext servletContext = servletContextEvent.getServletContext();
-         Set libJars = servletContext.getResourcePaths(path);
-         for (Object jar : libJars)
-         {
-            URL archive = servletContext.getResource((String) jar);
-            group.add(archive);
-         }
-         group.process();
-      }
-      catch (Exception e)
-      {
-         try
-         {
-            group.undeploy();
-         }
-         catch (DeploymentException e1)
-         {
-            log.warn("failed to undeploy on error");
-         }
-         log.error("failed to deploy from ServletListenerDeployer", e);
-         throw new RuntimeException(e);
-      }
-   }
-
-   public void contextDestroyed(ServletContextEvent servletContextEvent)
-   {
-      try
-      {
-         group.undeploy();
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-}
+/*
+ * 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.embedded;
+
+import java.net.URL;
+import java.util.Set;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.logging.Logger;
+
+/**
+ * Deploy all jars in WEB-INF/lib.  These jars are undeployed at WAR destruction
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 44597 $
+ */
+public class WebInfLibScanner implements ServletContextListener
+{
+   private static final Logger log = Logger.getLogger(WebInfLibScanner.class);
+
+   private DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+
+   public void contextInitialized(ServletContextEvent servletContextEvent)
+   {
+      scan(servletContextEvent, "/WEB-INF/lib");
+   }
+
+   protected void scan(ServletContextEvent servletContextEvent, String path)
+   {
+      try
+      {
+         ServletContext servletContext = servletContextEvent.getServletContext();
+         Set libJars = servletContext.getResourcePaths(path);
+         for (Object jar : libJars)
+         {
+            URL archive = servletContext.getResource((String) jar);
+            group.add(archive);
+         }
+         group.process();
+      }
+      catch (Exception e)
+      {
+         try
+         {
+            group.undeploy();
+         }
+         catch (DeploymentException e1)
+         {
+            log.warn("failed to undeploy on error");
+         }
+         log.error("failed to deploy from ServletListenerDeployer", e);
+         throw new RuntimeException(e);
+      }
+   }
+
+   public void contextDestroyed(ServletContextEvent servletContextEvent)
+   {
+      try
+      {
+         group.undeploy();
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+}


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

Modified: trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoader.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoader.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoader.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,36 +1,36 @@
-/*
- * 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.embedded.adapters;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class JMXClassLoader extends ClassLoader implements JMXClassLoaderMBean
-{
-   public JMXClassLoader(ClassLoader parent)
-   {
-      super(parent);
-   }
-}
+/*
+ * 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.embedded.adapters;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class JMXClassLoader extends ClassLoader implements JMXClassLoaderMBean
+{
+   public JMXClassLoader(ClassLoader parent)
+   {
+      super(parent);
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoader.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoaderMBean.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoaderMBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoaderMBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,32 +1,32 @@
-/*
- * 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.embedded.adapters;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public interface JMXClassLoaderMBean
-{
-}
+/*
+ * 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.embedded.adapters;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JMXClassLoaderMBean
+{
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXClassLoaderMBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernel.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernel.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernel.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,369 +1,369 @@
-/*
- * 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.embedded.adapters;
-
-import java.lang.reflect.Method;
-import java.util.Date;
-import java.util.Properties;
-import javax.management.ListenerNotFoundException;
-import javax.management.MBeanNotificationInfo;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.Notification;
-import javax.management.NotificationBroadcasterSupport;
-import javax.management.NotificationEmitter;
-import javax.management.NotificationFilter;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-
-import org.jboss.kernel.Kernel;
-import org.jboss.mx.server.ServerConstants;
-import org.jboss.mx.util.JMXExceptionDecoder;
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.system.ServiceController;
-import org.jboss.system.ServiceControllerMBean;
-import org.jboss.system.deployers.ServiceDeployer;
-import org.jboss.system.server.ServerConfigImpl;
-import org.jboss.system.server.ServerConfigImplMBean;
-import org.jboss.system.server.ServerImplMBean;
-import org.jboss.system.server.jmx.LazyMBeanServer;
-import org.jboss.util.JBossObject;
-
-/**
- * A pojo that creates a legacy jmx kernel ala the jboss-4.x server bootstrap.
- * This is used to support the SARDeployer and mbean integration.
- *
- * @author Scott.Stark at jboss.org
- * @author bill at jboss.org
- * @author adrian at jboss.org
- * @version $Revision:$
- */
-public class JMXKernel extends JBossObject implements JMXKernelMBean, NotificationEmitter
-{
-   /**
-    * The JMX MBeanServer which will serve as our communication bus.
-    */
-   private MBeanServer mbeanServer;
-   private ServiceController controller;
-   private Kernel kernel;
-   private ServerConfig serverConfig;
-   private NotificationBroadcasterSupport broadcasterSupport = new NotificationBroadcasterSupport();
-   private boolean started;
-
-   public ServiceControllerMBean getServiceController()
-   {
-      return this.controller;
-   }
-
-   public MBeanServer getMbeanServer()
-   {
-      return mbeanServer;
-   }
-
-   public void setKernel(Kernel kernel)
-   {
-      this.kernel = kernel;
-   }
-
-   public ServerConfig getServerConfig()
-   {
-      return serverConfig;
-   }
-
-   public void setServerConfig(ServerConfig serverConfig)
-   {
-      this.serverConfig = serverConfig;
-   }
-
-   /**
-    * We don't want to override platforms default mechanism for creating MBeanServer so lets just do it ourselves
-    *
-    * @param domain the domain
-    * @return the mbeanserver
-    * @throws Exception for any error
-    */
-   private MBeanServer createMBeanServer(String domain) throws Exception
-   {
-      MBeanServer server;
-
-      String builder = System.getProperty(ServerConstants.MBEAN_SERVER_BUILDER_CLASS_PROPERTY, ServerConstants.DEFAULT_MBEAN_SERVER_BUILDER_CLASS);
-      System.setProperty(ServerConstants.MBEAN_SERVER_BUILDER_CLASS_PROPERTY, builder);
-
-      // Check if we'll use the platform MBeanServer or instantiate our own
-      if (serverConfig.getPlatformMBeanServer() == true)
-      {
-         // jdk1.5+
-         ClassLoader cl = Thread.currentThread().getContextClassLoader();
-         Class clazz = cl.loadClass("java.lang.management.ManagementFactory");
-         Class[] sig = null;
-         Method method = clazz.getMethod("getPlatformMBeanServer", sig);
-         Object[] args = null;
-         server = (MBeanServer) method.invoke(null, args);
-         // Tell the MBeanServerLocator to point to this mbeanServer
-         MBeanServerLocator.setJBoss(server);
-         /* If the LazyMBeanServer was used, we need to reset to the jboss
-         MBeanServer to use our implementation for the jboss services.
-         */
-         server = LazyMBeanServer.resetToJBossServer(server);
-      }
-      else
-      {
-         // Create our own MBeanServer
-         server = MBeanServerFactory.createMBeanServer(domain);
-      }
-      log.debug("Created MBeanServer: " + server);
-
-      return server;
-   }
-
-   public static void setupUrlHandlers()
-   {
-      String pkgs = System.getProperty("java.protocol.handler.pkgs");
-      if (pkgs == null || pkgs.trim().length() == 0)
-      {
-         pkgs = "org.jboss.net.protocol";
-         System.setProperty("java.protocol.handler.pkgs", pkgs);
-      }
-      else if (!pkgs.contains("org.jboss.net.protocol"))
-      {
-         pkgs += "|org.jboss.net.protocol";
-         System.setProperty("java.protocol.handler.pkgs", pkgs);
-      }
-      //Field field = URL.class.getDeclaredField("")
-      //URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory());
-   }
-
-   public void start() throws Exception
-   {
-      setupUrlHandlers();
-      mbeanServer = createMBeanServer("jboss");
-      MBeanServerLocator.setJBoss(mbeanServer);
-
-      mbeanServer.registerMBean(new JMXClassLoader(Thread.currentThread().getContextClassLoader()), ServiceDeployer.DEFAULT_CLASSLOADER_OBJECT_NAME);
-
-      controller = new ServiceController();
-      controller.setKernel(kernel);
-      controller.setMBeanServer(mbeanServer);
-      mbeanServer.registerMBean(controller, new ObjectName("jboss.system:service=ServiceController"));
-      // Register mbeanServer components
-      mbeanServer.registerMBean(this, ServerImplMBean.OBJECT_NAME);
-      mbeanServer.registerMBean(new ServerConfigImpl(serverConfig), ServerConfigImplMBean.OBJECT_NAME);
-      started = true;
-   }
-
-   /**
-    * Stop the mbeans
-    *
-    * @throws IllegalStateException - if not started.
-    */
-   public void stop() throws IllegalStateException
-   {
-      if (log.isTraceEnabled())
-         log.trace("stop caller:", new Throwable("Here"));
-
-      if (!started)
-         throw new IllegalStateException("Server not started");
-
-      log.debug("Shutting down all services");
-      shutdownServices();
-
-      // Make sure all mbeans are unregistered
-      removeMBeans();
-   }
-
-   /**
-    * The <code>shutdownServices</code> method calls the one and only
-    * ServiceController to shut down all the mbeans registered with it.
-    */
-   protected void shutdownServices()
-   {
-      try
-      {
-         // get the deployed objects from ServiceController
-         controller.shutdown();
-      }
-      catch (Exception e)
-      {
-         Throwable t = JMXExceptionDecoder.decode(e);
-         log.error("Failed to shutdown services", t);
-      }
-   }
-
-   /**
-    * The <code>removeMBeans</code> method uses the mbean mbeanServer to unregister
-    * all the mbeans registered here.
-    */
-   protected void removeMBeans()
-   {
-      try
-      {
-         mbeanServer.unregisterMBean(ServiceControllerMBean.OBJECT_NAME);
-      }
-      catch (Exception e)
-      {
-         Throwable t = JMXExceptionDecoder.decode(e);
-         log.error("Failed to unregister mbeans", t);
-      }
-   }
-
-   public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
-   {
-      broadcasterSupport.addNotificationListener(listener, filter, handback);
-   }
-
-   public void removeNotificationListener(NotificationListener listener)
-           throws ListenerNotFoundException
-   {
-      broadcasterSupport.removeNotificationListener(listener);
-   }
-
-   public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
-           throws ListenerNotFoundException
-   {
-      broadcasterSupport.removeNotificationListener(listener, filter, handback);
-   }
-
-   public MBeanNotificationInfo[] getNotificationInfo()
-   {
-      return broadcasterSupport.getNotificationInfo();
-   }
-
-   public void sendNotification(Notification notification)
-   {
-      broadcasterSupport.sendNotification(notification);
-   }
-
-   public void runGarbageCollector()
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void runFinalization()
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void traceMethodCalls(Boolean flag)
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void traceInstructions(Boolean flag)
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public Date getStartDate()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public String getVersion()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public String getVersionName()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public String getBuildNumber()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public String getBuildJVM()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public String getBuildOS()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public String getBuildID()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public String getBuildDate()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public boolean isInShutdown()
-   {
-      return false;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void init(Properties props) throws IllegalStateException, Exception
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public ServerConfig getConfig() throws IllegalStateException
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public boolean isStarted()
-   {
-      return false;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void shutdown() throws IllegalStateException
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void exit(int exitcode)
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void exit()
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void halt(int exitcode)
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void halt()
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public String getSpecificationVersion()
-   {
-      return serverConfig.getSpecificationVersion();
-   }
-
-   public String getVersionNumber()
-   {
-      return "";
-   }
-}
+/*
+ * 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.embedded.adapters;
+
+import java.lang.reflect.Method;
+import java.util.Date;
+import java.util.Properties;
+import javax.management.ListenerNotFoundException;
+import javax.management.MBeanNotificationInfo;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.Notification;
+import javax.management.NotificationBroadcasterSupport;
+import javax.management.NotificationEmitter;
+import javax.management.NotificationFilter;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.mx.server.ServerConstants;
+import org.jboss.mx.util.JMXExceptionDecoder;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.system.ServiceController;
+import org.jboss.system.ServiceControllerMBean;
+import org.jboss.system.deployers.ServiceDeployer;
+import org.jboss.system.server.ServerConfigImpl;
+import org.jboss.system.server.ServerConfigImplMBean;
+import org.jboss.system.server.ServerImplMBean;
+import org.jboss.system.server.jmx.LazyMBeanServer;
+import org.jboss.util.JBossObject;
+
+/**
+ * A pojo that creates a legacy jmx kernel ala the jboss-4.x server bootstrap.
+ * This is used to support the SARDeployer and mbean integration.
+ *
+ * @author Scott.Stark at jboss.org
+ * @author bill at jboss.org
+ * @author adrian at jboss.org
+ * @version $Revision:$
+ */
+public class JMXKernel extends JBossObject implements JMXKernelMBean, NotificationEmitter
+{
+   /**
+    * The JMX MBeanServer which will serve as our communication bus.
+    */
+   private MBeanServer mbeanServer;
+   private ServiceController controller;
+   private Kernel kernel;
+   private ServerConfig serverConfig;
+   private NotificationBroadcasterSupport broadcasterSupport = new NotificationBroadcasterSupport();
+   private boolean started;
+
+   public ServiceControllerMBean getServiceController()
+   {
+      return this.controller;
+   }
+
+   public MBeanServer getMbeanServer()
+   {
+      return mbeanServer;
+   }
+
+   public void setKernel(Kernel kernel)
+   {
+      this.kernel = kernel;
+   }
+
+   public ServerConfig getServerConfig()
+   {
+      return serverConfig;
+   }
+
+   public void setServerConfig(ServerConfig serverConfig)
+   {
+      this.serverConfig = serverConfig;
+   }
+
+   /**
+    * We don't want to override platforms default mechanism for creating MBeanServer so lets just do it ourselves
+    *
+    * @param domain the domain
+    * @return the mbeanserver
+    * @throws Exception for any error
+    */
+   private MBeanServer createMBeanServer(String domain) throws Exception
+   {
+      MBeanServer server;
+
+      String builder = System.getProperty(ServerConstants.MBEAN_SERVER_BUILDER_CLASS_PROPERTY, ServerConstants.DEFAULT_MBEAN_SERVER_BUILDER_CLASS);
+      System.setProperty(ServerConstants.MBEAN_SERVER_BUILDER_CLASS_PROPERTY, builder);
+
+      // Check if we'll use the platform MBeanServer or instantiate our own
+      if (serverConfig.getPlatformMBeanServer() == true)
+      {
+         // jdk1.5+
+         ClassLoader cl = Thread.currentThread().getContextClassLoader();
+         Class clazz = cl.loadClass("java.lang.management.ManagementFactory");
+         Class[] sig = null;
+         Method method = clazz.getMethod("getPlatformMBeanServer", sig);
+         Object[] args = null;
+         server = (MBeanServer) method.invoke(null, args);
+         // Tell the MBeanServerLocator to point to this mbeanServer
+         MBeanServerLocator.setJBoss(server);
+         /* If the LazyMBeanServer was used, we need to reset to the jboss
+         MBeanServer to use our implementation for the jboss services.
+         */
+         server = LazyMBeanServer.resetToJBossServer(server);
+      }
+      else
+      {
+         // Create our own MBeanServer
+         server = MBeanServerFactory.createMBeanServer(domain);
+      }
+      log.debug("Created MBeanServer: " + server);
+
+      return server;
+   }
+
+   public static void setupUrlHandlers()
+   {
+      String pkgs = System.getProperty("java.protocol.handler.pkgs");
+      if (pkgs == null || pkgs.trim().length() == 0)
+      {
+         pkgs = "org.jboss.net.protocol";
+         System.setProperty("java.protocol.handler.pkgs", pkgs);
+      }
+      else if (!pkgs.contains("org.jboss.net.protocol"))
+      {
+         pkgs += "|org.jboss.net.protocol";
+         System.setProperty("java.protocol.handler.pkgs", pkgs);
+      }
+      //Field field = URL.class.getDeclaredField("")
+      //URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory());
+   }
+
+   public void start() throws Exception
+   {
+      setupUrlHandlers();
+      mbeanServer = createMBeanServer("jboss");
+      MBeanServerLocator.setJBoss(mbeanServer);
+
+      mbeanServer.registerMBean(new JMXClassLoader(Thread.currentThread().getContextClassLoader()), ServiceDeployer.DEFAULT_CLASSLOADER_OBJECT_NAME);
+
+      controller = new ServiceController();
+      controller.setKernel(kernel);
+      controller.setMBeanServer(mbeanServer);
+      mbeanServer.registerMBean(controller, new ObjectName("jboss.system:service=ServiceController"));
+      // Register mbeanServer components
+      mbeanServer.registerMBean(this, ServerImplMBean.OBJECT_NAME);
+      mbeanServer.registerMBean(new ServerConfigImpl(serverConfig), ServerConfigImplMBean.OBJECT_NAME);
+      started = true;
+   }
+
+   /**
+    * Stop the mbeans
+    *
+    * @throws IllegalStateException - if not started.
+    */
+   public void stop() throws IllegalStateException
+   {
+      if (log.isTraceEnabled())
+         log.trace("stop caller:", new Throwable("Here"));
+
+      if (!started)
+         throw new IllegalStateException("Server not started");
+
+      log.debug("Shutting down all services");
+      shutdownServices();
+
+      // Make sure all mbeans are unregistered
+      removeMBeans();
+   }
+
+   /**
+    * The <code>shutdownServices</code> method calls the one and only
+    * ServiceController to shut down all the mbeans registered with it.
+    */
+   protected void shutdownServices()
+   {
+      try
+      {
+         // get the deployed objects from ServiceController
+         controller.shutdown();
+      }
+      catch (Exception e)
+      {
+         Throwable t = JMXExceptionDecoder.decode(e);
+         log.error("Failed to shutdown services", t);
+      }
+   }
+
+   /**
+    * The <code>removeMBeans</code> method uses the mbean mbeanServer to unregister
+    * all the mbeans registered here.
+    */
+   protected void removeMBeans()
+   {
+      try
+      {
+         mbeanServer.unregisterMBean(ServiceControllerMBean.OBJECT_NAME);
+      }
+      catch (Exception e)
+      {
+         Throwable t = JMXExceptionDecoder.decode(e);
+         log.error("Failed to unregister mbeans", t);
+      }
+   }
+
+   public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
+   {
+      broadcasterSupport.addNotificationListener(listener, filter, handback);
+   }
+
+   public void removeNotificationListener(NotificationListener listener)
+           throws ListenerNotFoundException
+   {
+      broadcasterSupport.removeNotificationListener(listener);
+   }
+
+   public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
+           throws ListenerNotFoundException
+   {
+      broadcasterSupport.removeNotificationListener(listener, filter, handback);
+   }
+
+   public MBeanNotificationInfo[] getNotificationInfo()
+   {
+      return broadcasterSupport.getNotificationInfo();
+   }
+
+   public void sendNotification(Notification notification)
+   {
+      broadcasterSupport.sendNotification(notification);
+   }
+
+   public void runGarbageCollector()
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void runFinalization()
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void traceMethodCalls(Boolean flag)
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void traceInstructions(Boolean flag)
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public Date getStartDate()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getVersion()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getVersionName()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getBuildNumber()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getBuildJVM()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getBuildOS()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getBuildID()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getBuildDate()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public boolean isInShutdown()
+   {
+      return false;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void init(Properties props) throws IllegalStateException, Exception
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public ServerConfig getConfig() throws IllegalStateException
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public boolean isStarted()
+   {
+      return false;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void shutdown() throws IllegalStateException
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void exit(int exitcode)
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void exit()
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void halt(int exitcode)
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void halt()
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getSpecificationVersion()
+   {
+      return serverConfig.getSpecificationVersion();
+   }
+
+   public String getVersionNumber()
+   {
+      return "";
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernel.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernelMBean.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernelMBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernelMBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,34 +1,34 @@
-/*
- * 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.embedded.adapters;
-
-import org.jboss.system.server.ServerImplMBean;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public interface JMXKernelMBean extends ServerImplMBean
-{
-}
+/*
+ * 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.embedded.adapters;
+
+import org.jboss.system.server.ServerImplMBean;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JMXKernelMBean extends ServerImplMBean
+{
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/adapters/JMXKernelMBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/adapters/LocalOnlyUserTransaction.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/adapters/LocalOnlyUserTransaction.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/adapters/LocalOnlyUserTransaction.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,144 +1,144 @@
-/*
- * 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.embedded.adapters;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import javax.transaction.UserTransaction;
-
-import org.jboss.logging.Logger;
-import org.jboss.tm.TransactionManagerLocator;
-
-/**
- * Simple, local-only UserTransaction adapter
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision: 40050 $
- */
-public final class LocalOnlyUserTransaction implements UserTransaction, java.io.Externalizable
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -5998336139321082314L;
-
-   protected static Logger log = Logger.getLogger(LocalOnlyUserTransaction.class);
-
-   private boolean trace = log.isTraceEnabled();
-   
-   /**
-    * Timeout value in seconds for new transactions started
-    * by this bean instance.
-    */
-   private TransactionManager tm;
-
-   public LocalOnlyUserTransaction()
-   {
-   }
-
-   public void start()
-   {
-      if (trace)
-         log.trace("new UserTx: " + this);
-      this.tm = TransactionManagerLocator.locateTransactionManager();
-   }
-
-   public void stop()
-   {
-      this.tm = null;
-   }
-
-   public void begin()
-           throws NotSupportedException, SystemException
-   {
-      // Start the transaction
-      tm.begin();
-
-      Transaction tx = tm.getTransaction();
-      if (trace)
-         log.trace("UserTx begin: " + tx);
-   }
-
-   public void commit()
-           throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
-                  SecurityException, IllegalStateException, SystemException
-   {
-      Transaction tx = tm.getTransaction();
-      if (trace)
-         log.trace("UserTx commit: " + tx);
-
-      tm.commit();
-   }
-
-   public void rollback()
-           throws IllegalStateException, SecurityException, SystemException
-   {
-      Transaction tx = tm.getTransaction();
-      if (trace)
-         log.trace("UserTx rollback: " + tx);
-
-      tm.rollback();
-   }
-
-   public void setRollbackOnly()
-           throws IllegalStateException, SystemException
-   {
-      Transaction tx = tm.getTransaction();
-      if (trace)
-         log.trace("UserTx setRollbackOnly: " + tx);
-
-      tm.setRollbackOnly();
-   }
-
-   public int getStatus()
-           throws SystemException
-   {
-      return tm.getStatus();
-   }
-
-   /**
-    * Set the transaction timeout value for new transactions
-    * started by this instance.
-    */
-   public void setTransactionTimeout(int seconds)
-           throws SystemException
-   {
-      tm.setTransactionTimeout(seconds);
-   }
-
-   public void writeExternal(ObjectOutput out) throws IOException
-   {
-   }
-
-   public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
-   {
-      this.tm = TransactionManagerLocator.locateTransactionManager();
-   }
-}
+/*
+ * 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.embedded.adapters;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import javax.transaction.HeuristicMixedException;
+import javax.transaction.HeuristicRollbackException;
+import javax.transaction.NotSupportedException;
+import javax.transaction.RollbackException;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import javax.transaction.UserTransaction;
+
+import org.jboss.logging.Logger;
+import org.jboss.tm.TransactionManagerLocator;
+
+/**
+ * Simple, local-only UserTransaction adapter
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @author adrian at jboss.org
+ * @version $Revision: 40050 $
+ */
+public final class LocalOnlyUserTransaction implements UserTransaction, java.io.Externalizable
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -5998336139321082314L;
+
+   protected static Logger log = Logger.getLogger(LocalOnlyUserTransaction.class);
+
+   private boolean trace = log.isTraceEnabled();
+   
+   /**
+    * Timeout value in seconds for new transactions started
+    * by this bean instance.
+    */
+   private TransactionManager tm;
+
+   public LocalOnlyUserTransaction()
+   {
+   }
+
+   public void start()
+   {
+      if (trace)
+         log.trace("new UserTx: " + this);
+      this.tm = TransactionManagerLocator.locateTransactionManager();
+   }
+
+   public void stop()
+   {
+      this.tm = null;
+   }
+
+   public void begin()
+           throws NotSupportedException, SystemException
+   {
+      // Start the transaction
+      tm.begin();
+
+      Transaction tx = tm.getTransaction();
+      if (trace)
+         log.trace("UserTx begin: " + tx);
+   }
+
+   public void commit()
+           throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
+                  SecurityException, IllegalStateException, SystemException
+   {
+      Transaction tx = tm.getTransaction();
+      if (trace)
+         log.trace("UserTx commit: " + tx);
+
+      tm.commit();
+   }
+
+   public void rollback()
+           throws IllegalStateException, SecurityException, SystemException
+   {
+      Transaction tx = tm.getTransaction();
+      if (trace)
+         log.trace("UserTx rollback: " + tx);
+
+      tm.rollback();
+   }
+
+   public void setRollbackOnly()
+           throws IllegalStateException, SystemException
+   {
+      Transaction tx = tm.getTransaction();
+      if (trace)
+         log.trace("UserTx setRollbackOnly: " + tx);
+
+      tm.setRollbackOnly();
+   }
+
+   public int getStatus()
+           throws SystemException
+   {
+      return tm.getStatus();
+   }
+
+   /**
+    * Set the transaction timeout value for new transactions
+    * started by this instance.
+    */
+   public void setTransactionTimeout(int seconds)
+           throws SystemException
+   {
+      tm.setTransactionTimeout(seconds);
+   }
+
+   public void writeExternal(ObjectOutput out) throws IOException
+   {
+   }
+
+   public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+   {
+      this.tm = TransactionManagerLocator.locateTransactionManager();
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/adapters/LocalOnlyUserTransaction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/adapters/ServerConfig.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/adapters/ServerConfig.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/adapters/ServerConfig.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,270 +1,270 @@
-/*
- * 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.embedded.adapters;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Properties;
-
-import org.jboss.bootstrap.BaseServerConfig;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.DeploymentScanner;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class ServerConfig implements org.jboss.bootstrap.spi.ServerConfig
-{
-   protected BaseServerConfig config;
-   protected Properties props;
-
-   public void start() throws Exception
-   {
-      props = new Properties(System.getProperties());
-
-      String homeDir = System.getProperty(HOME_DIR);
-
-      // if HOME_DIR property is null, then try to figure it out
-      if (homeDir == null)
-      {
-
-         String path = System.getProperty(Bootstrap.BOOTSTRAP_RESOURCE_PATH);
-         if (path == null) throw new Exception("${jboss.embedded.bootstrap.resource.path} is null");
-
-
-         path += Bootstrap.BOOTSTRAP_RESOURCE_FILE;
-
-         URL url = Thread.currentThread().getContextClassLoader().getResource(path);
-         if (url.toString().startsWith("file:"))
-         {
-            initializeByFile(path);
-         }
-         else
-         {
-            // we do not know the protocol
-            initializeByUnknown();
-         }
-      }
-      else
-      {
-         props.put(SERVER_HOME_DIR, homeDir);
-      }
-      config = new BaseServerConfig(props);
-      config.initURLs();
-
-      // create tmp and data directories
-
-      if (!config.getServerTempDir().exists())
-      {
-         config.getServerTempDir().mkdir();
-      }
-      if (!config.getServerDataDir().exists())
-      {
-         config.getServerDataDir().mkdir();
-      }
-   }
-
-   protected void initializeByFile(String path) throws Exception
-   {
-      URL homeDirUrl = DeploymentScanner.getDirFromResource(Thread.currentThread().getContextClassLoader(), path + "/..");
-      File homeDir = new File(homeDirUrl.toURI());
-      props.put(HOME_DIR, homeDir.toString());
-      props.put(SERVER_HOME_DIR, homeDir.toString());
-   }
-
-   /**
-    * Creates base JBoss Embedded directory structure under java.io.tmpdir
-    *
-    * @throws Exception
-    */
-   protected void initializeByUnknown() throws Exception
-   {
-      String temp = System.getProperty("java.io.tmpdir");
-      File fp = new File(temp, "embedded-jboss");
-      if (!fp.exists())
-      {
-         fp.mkdir();
-      }
-      props.put(HOME_DIR, fp.toString());
-      props.put(SERVER_HOME_DIR, fp.toString());
-   }
-
-   public void initURLs()
-           throws MalformedURLException
-   {
-      config.initURLs();
-   }
-
-   public File getHomeDir()
-   {
-      return config.getHomeDir();
-   }
-
-   public URL getBootstrapURL()
-   {
-      return config.getBootstrapURL();
-   }
-
-   public URL getHomeURL()
-   {
-      return config.getHomeURL();
-   }
-
-   public URL getLibraryURL()
-   {
-      return config.getLibraryURL();
-   }
-
-   public URL getPatchURL()
-   {
-      return config.getPatchURL();
-   }
-
-   public boolean isInstallLifeThread()
-   {
-      return config.isInstallLifeThread();
-   }
-
-   public String getServerName()
-   {
-      return config.getServerName();
-   }
-
-   public File getServerBaseDir()
-   {
-      return config.getServerBaseDir();
-   }
-
-   public File getServerHomeDir()
-   {
-      return config.getServerHomeDir();
-   }
-
-   public File getServerLogDir()
-   {
-      return config.getServerLogDir();
-   }
-
-   public File getServerTempDir()
-   {
-      return config.getServerTempDir();
-   }
-
-   public File getServerDataDir()
-   {
-      return config.getServerDataDir();
-   }
-
-   public File getServerNativeDir()
-   {
-      return config.getServerNativeDir();
-   }
-
-   public File getServerTempDeployDir()
-   {
-      return config.getServerTempDeployDir();
-   }
-
-   public URL getServerBaseURL()
-   {
-      return config.getServerBaseURL();
-   }
-
-   public URL getServerHomeURL()
-   {
-      return config.getServerHomeURL();
-   }
-
-   public URL getServerLibraryURL()
-   {
-      return config.getServerLibraryURL();
-   }
-
-   public URL getCommonBaseURL()
-   {
-      return config.getCommonBaseURL();
-   }
-   
-   public URL getCommonLibraryURL()
-   {
-      return config.getCommonLibraryURL();
-   }
-   
-   public URL getServerConfigURL()
-   {
-      return config.getServerConfigURL();
-   }
-
-   public boolean getPlatformMBeanServer()
-   {
-      return config.getPlatformMBeanServer();
-   }
-
-   public void setExitOnShutdown(boolean flag)
-   {
-      config.setExitOnShutdown(flag);
-   }
-
-   public boolean getExitOnShutdown()
-   {
-      return config.getExitOnShutdown();
-   }
-
-   public void setBlockingShutdown(boolean flag)
-   {
-      config.setBlockingShutdown(flag);
-   }
-
-   public boolean getBlockingShutdown()
-   {
-      return config.getBlockingShutdown();
-   }
-
-   public void setRequireJBossURLStreamHandlerFactory(boolean flag)
-   {
-      config.setRequireJBossURLStreamHandlerFactory(flag);
-   }
-
-   public boolean getRequireJBossURLStreamHandlerFactory()
-   {
-      return config.getRequireJBossURLStreamHandlerFactory();
-   }
-
-   public void setRootDeploymentFilename(String filename)
-   {
-      config.setRootDeploymentFilename(filename);
-   }
-
-   public String getRootDeploymentFilename()
-   {
-      return config.getRootDeploymentFilename();
-   }
-
-   public String getSpecificationVersion()
-   {
-      return config.getSpecificationVersion();
-   }
+/*
+ * 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.embedded.adapters;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.jboss.bootstrap.BaseServerConfig;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.DeploymentScanner;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServerConfig implements org.jboss.bootstrap.spi.ServerConfig
+{
+   protected BaseServerConfig config;
+   protected Properties props;
+
+   public void start() throws Exception
+   {
+      props = new Properties(System.getProperties());
+
+      String homeDir = System.getProperty(HOME_DIR);
+
+      // if HOME_DIR property is null, then try to figure it out
+      if (homeDir == null)
+      {
+
+         String path = System.getProperty(Bootstrap.BOOTSTRAP_RESOURCE_PATH);
+         if (path == null) throw new Exception("${jboss.embedded.bootstrap.resource.path} is null");
+
+
+         path += Bootstrap.BOOTSTRAP_RESOURCE_FILE;
+
+         URL url = Thread.currentThread().getContextClassLoader().getResource(path);
+         if (url.toString().startsWith("file:"))
+         {
+            initializeByFile(path);
+         }
+         else
+         {
+            // we do not know the protocol
+            initializeByUnknown();
+         }
+      }
+      else
+      {
+         props.put(SERVER_HOME_DIR, homeDir);
+      }
+      config = new BaseServerConfig(props);
+      config.initURLs();
+
+      // create tmp and data directories
+
+      if (!config.getServerTempDir().exists())
+      {
+         config.getServerTempDir().mkdir();
+      }
+      if (!config.getServerDataDir().exists())
+      {
+         config.getServerDataDir().mkdir();
+      }
+   }
+
+   protected void initializeByFile(String path) throws Exception
+   {
+      URL homeDirUrl = DeploymentScanner.getDirFromResource(Thread.currentThread().getContextClassLoader(), path + "/..");
+      File homeDir = new File(homeDirUrl.toURI());
+      props.put(HOME_DIR, homeDir.toString());
+      props.put(SERVER_HOME_DIR, homeDir.toString());
+   }
+
+   /**
+    * Creates base JBoss Embedded directory structure under java.io.tmpdir
+    *
+    * @throws Exception
+    */
+   protected void initializeByUnknown() throws Exception
+   {
+      String temp = System.getProperty("java.io.tmpdir");
+      File fp = new File(temp, "embedded-jboss");
+      if (!fp.exists())
+      {
+         fp.mkdir();
+      }
+      props.put(HOME_DIR, fp.toString());
+      props.put(SERVER_HOME_DIR, fp.toString());
+   }
+
+   public void initURLs()
+           throws MalformedURLException
+   {
+      config.initURLs();
+   }
+
+   public File getHomeDir()
+   {
+      return config.getHomeDir();
+   }
+
+   public URL getBootstrapURL()
+   {
+      return config.getBootstrapURL();
+   }
+
+   public URL getHomeURL()
+   {
+      return config.getHomeURL();
+   }
+
+   public URL getLibraryURL()
+   {
+      return config.getLibraryURL();
+   }
+
+   public URL getPatchURL()
+   {
+      return config.getPatchURL();
+   }
+
+   public boolean isInstallLifeThread()
+   {
+      return config.isInstallLifeThread();
+   }
+
+   public String getServerName()
+   {
+      return config.getServerName();
+   }
+
+   public File getServerBaseDir()
+   {
+      return config.getServerBaseDir();
+   }
+
+   public File getServerHomeDir()
+   {
+      return config.getServerHomeDir();
+   }
+
+   public File getServerLogDir()
+   {
+      return config.getServerLogDir();
+   }
+
+   public File getServerTempDir()
+   {
+      return config.getServerTempDir();
+   }
+
+   public File getServerDataDir()
+   {
+      return config.getServerDataDir();
+   }
+
+   public File getServerNativeDir()
+   {
+      return config.getServerNativeDir();
+   }
+
+   public File getServerTempDeployDir()
+   {
+      return config.getServerTempDeployDir();
+   }
+
+   public URL getServerBaseURL()
+   {
+      return config.getServerBaseURL();
+   }
+
+   public URL getServerHomeURL()
+   {
+      return config.getServerHomeURL();
+   }
+
+   public URL getServerLibraryURL()
+   {
+      return config.getServerLibraryURL();
+   }
+
+   public URL getCommonBaseURL()
+   {
+      return config.getCommonBaseURL();
+   }
+   
+   public URL getCommonLibraryURL()
+   {
+      return config.getCommonLibraryURL();
+   }
+   
+   public URL getServerConfigURL()
+   {
+      return config.getServerConfigURL();
+   }
+
+   public boolean getPlatformMBeanServer()
+   {
+      return config.getPlatformMBeanServer();
+   }
+
+   public void setExitOnShutdown(boolean flag)
+   {
+      config.setExitOnShutdown(flag);
+   }
+
+   public boolean getExitOnShutdown()
+   {
+      return config.getExitOnShutdown();
+   }
+
+   public void setBlockingShutdown(boolean flag)
+   {
+      config.setBlockingShutdown(flag);
+   }
+
+   public boolean getBlockingShutdown()
+   {
+      return config.getBlockingShutdown();
+   }
+
+   public void setRequireJBossURLStreamHandlerFactory(boolean flag)
+   {
+      config.setRequireJBossURLStreamHandlerFactory(flag);
+   }
+
+   public boolean getRequireJBossURLStreamHandlerFactory()
+   {
+      return config.getRequireJBossURLStreamHandlerFactory();
+   }
+
+   public void setRootDeploymentFilename(String filename)
+   {
+      config.setRootDeploymentFilename(filename);
+   }
+
+   public String getRootDeploymentFilename()
+   {
+      return config.getRootDeploymentFilename();
+   }
+
+   public String getSpecificationVersion()
+   {
+      return config.getSpecificationVersion();
+   }
 }
\ No newline at end of file


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/adapters/ServerConfig.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/jndi/BridgeContext.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/jndi/BridgeContext.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/jndi/BridgeContext.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,91 +1,91 @@
-/*
- * 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.embedded.jndi;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import javax.naming.Context;
-import javax.naming.NameNotFoundException;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-/** This class is the Context interface handler and performs the
-    failed lookup delegation from the primary to secondary naming
-    Context.
-*/
-public class BridgeContext implements InvocationHandler
-{
-   private Context primaryCtx;
-   private Context secondaryCtx;
-
-   public static Context createBridge(Context primaryCtx, Context secondaryCtx)
-   {
-      BridgeContext h = new BridgeContext(primaryCtx, secondaryCtx);
-      Class[] interfaces = {Context.class};
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      return (Context) Proxy.newProxyInstance(loader, interfaces, h);
-   }
-
-   BridgeContext(Context primaryCtx, Context secondaryCtx)
-   {
-      this.primaryCtx = primaryCtx;
-      this.secondaryCtx = secondaryCtx;
-   }
-
-   public Object invoke(Object proxy, Method method, Object[] args)
-         throws Throwable
-   {
-      Object value;
-      // First try the primary context
-      try
-      {
-         value = method.invoke(primaryCtx, args);
-      }
-      catch(InvocationTargetException e)
-      {
-         Throwable t = e.getTargetException();
-         // Try the secondary if this is a failed lookup
-         if( t instanceof NameNotFoundException && method.getName().startsWith("lookup") )
-         {
-            try
-            {
-               value = method.invoke(secondaryCtx, args);
-            }
-            catch (InvocationTargetException e1)
-            {
-               throw e1.getTargetException();
-            }
-         }
-         else
-         {
-            throw t;
-         }
-      }
-      return value;
-   }
-}
+/*
+ * 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.embedded.jndi;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import javax.naming.Context;
+import javax.naming.NameNotFoundException;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+/** This class is the Context interface handler and performs the
+    failed lookup delegation from the primary to secondary naming
+    Context.
+*/
+public class BridgeContext implements InvocationHandler
+{
+   private Context primaryCtx;
+   private Context secondaryCtx;
+
+   public static Context createBridge(Context primaryCtx, Context secondaryCtx)
+   {
+      BridgeContext h = new BridgeContext(primaryCtx, secondaryCtx);
+      Class[] interfaces = {Context.class};
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      return (Context) Proxy.newProxyInstance(loader, interfaces, h);
+   }
+
+   BridgeContext(Context primaryCtx, Context secondaryCtx)
+   {
+      this.primaryCtx = primaryCtx;
+      this.secondaryCtx = secondaryCtx;
+   }
+
+   public Object invoke(Object proxy, Method method, Object[] args)
+         throws Throwable
+   {
+      Object value;
+      // First try the primary context
+      try
+      {
+         value = method.invoke(primaryCtx, args);
+      }
+      catch(InvocationTargetException e)
+      {
+         Throwable t = e.getTargetException();
+         // Try the secondary if this is a failed lookup
+         if( t instanceof NameNotFoundException && method.getName().startsWith("lookup") )
+         {
+            try
+            {
+               value = method.invoke(secondaryCtx, args);
+            }
+            catch (InvocationTargetException e1)
+            {
+               throw e1.getTargetException();
+            }
+         }
+         else
+         {
+            throw t;
+         }
+      }
+      return value;
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/jndi/BridgeContext.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/jndi/DelegatingContextFactory.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/jndi/DelegatingContextFactory.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/jndi/DelegatingContextFactory.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,71 +1,71 @@
-/*
- * 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.embedded.jndi;
-
-import org.jnp.interfaces.NamingContextFactory;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.spi.InitialContextFactory;
-import java.util.Hashtable;
-
-/**
- * abstract class that delegates to a different initial context factory
- * Allows you to reuse other JBoss context factories like the security one.
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public abstract class DelegatingContextFactory implements InitialContextFactory
-{
-   public static final String INITIAL_CONTEXT_FACTORY_DELEGATE = "jboss.embedded.initial.context.factory.delegate";
-   public static final String INITIAL_CONTEXT_FACTORY_DEFAULT = "org.jnp.interfaces.NamingContextFactory";
-   private NamingContextFactory delegate;
-
-   protected synchronized NamingContextFactory getDelegate(Hashtable env) throws NamingException
-   {
-      if (delegate != null) return delegate;
-      String factoryName = (String) env.get(INITIAL_CONTEXT_FACTORY_DELEGATE);
-      if (factoryName != null)
-      {
-         try
-         {
-            Class clazz = Thread.currentThread().getContextClassLoader().loadClass(factoryName);
-            delegate = (NamingContextFactory)clazz.newInstance();
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException("Unable to initialize InitialContextFactory", e);
-         }
-      }
-      else
-      {
-         delegate = new NamingContextFactory();
-      }
-      return delegate;
-   }
-
-   public Context getInitialContext(Hashtable env) throws NamingException
-   {
-      return getDelegate(env).getInitialContext(env);
-   }
-}
+/*
+ * 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.embedded.jndi;
+
+import org.jnp.interfaces.NamingContextFactory;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.spi.InitialContextFactory;
+import java.util.Hashtable;
+
+/**
+ * abstract class that delegates to a different initial context factory
+ * Allows you to reuse other JBoss context factories like the security one.
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class DelegatingContextFactory implements InitialContextFactory
+{
+   public static final String INITIAL_CONTEXT_FACTORY_DELEGATE = "jboss.embedded.initial.context.factory.delegate";
+   public static final String INITIAL_CONTEXT_FACTORY_DEFAULT = "org.jnp.interfaces.NamingContextFactory";
+   private NamingContextFactory delegate;
+
+   protected synchronized NamingContextFactory getDelegate(Hashtable env) throws NamingException
+   {
+      if (delegate != null) return delegate;
+      String factoryName = (String) env.get(INITIAL_CONTEXT_FACTORY_DELEGATE);
+      if (factoryName != null)
+      {
+         try
+         {
+            Class clazz = Thread.currentThread().getContextClassLoader().loadClass(factoryName);
+            delegate = (NamingContextFactory)clazz.newInstance();
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException("Unable to initialize InitialContextFactory", e);
+         }
+      }
+      else
+      {
+         delegate = new NamingContextFactory();
+      }
+      return delegate;
+   }
+
+   public Context getInitialContext(Hashtable env) throws NamingException
+   {
+      return getDelegate(env).getInitialContext(env);
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/jndi/DelegatingContextFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/jndi/KernelInitializingContextFactory.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/jndi/KernelInitializingContextFactory.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/jndi/KernelInitializingContextFactory.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,87 +1,87 @@
-/*
- * 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.embedded.jndi;
-
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.jboss.embedded.Bootstrap;
-import org.jboss.naming.JBossRemotingContextFactory;
-
-/**
- * InitialContextFactory that will bootstrap embedded jboss.
- *
- * If Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS are set,
- * this InitialContextFactory implementation combines the
- * authentication phase with the InitialContext creation. During the
- * getInitialContext callback from the JNDI naming, layer security context
- * identity is populated with the username obtained from the
- * Context.SECURITY_PRINCIPAL env property and the credentials from the
- * Context.SECURITY_CREDENTIALS env property. There is no actual authentication
- * of this information. It is merely made available to the jboss transport
- * layer for incorporation into subsequent invocations. Authentication and
- * authorization will occur on the server.
- *
- * If Context.SECURITY_PROTOCOL is provided as well as the principal and credentials,
- * then a JAAS login will be performed instead using the security domain provided with the
- * SECURITY_PROTOCOL variable.
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class KernelInitializingContextFactory extends JBossRemotingContextFactory
-{
-   public static boolean initialized = false;
-   public static final String BOOTSTRAP_RESOURCE_PATH = "jboss.embedded.resource.path";
-
-   public static synchronized void bootstrapEmbeddedKernel(Hashtable env)
-   {
-      if (initialized == false)
-      {
-         initialized = true;
-         String bootstrapResourcePath = (String) env.get(BOOTSTRAP_RESOURCE_PATH);
-         try
-         {
-            if (bootstrapResourcePath != null)
-            {
-               Bootstrap.getInstance().bootstrap(bootstrapResourcePath);
-            }
-            else
-            {
-               Bootstrap.getInstance().bootstrap();
-            }
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException("Unable to bootstrap JBoss kernel", e);
-         }
-      }
-   }
-
-   // InitialContextFactory implementation --------------------------
-   public Context getInitialContext(Hashtable env) throws NamingException
-   {
-      KernelInitializingContextFactory.bootstrapEmbeddedKernel(env);
-      return super.getInitialContext(env);
-   }
-}
+/*
+ * 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.embedded.jndi;
+
+import java.util.Hashtable;
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.embedded.Bootstrap;
+import org.jboss.naming.JBossRemotingContextFactory;
+
+/**
+ * InitialContextFactory that will bootstrap embedded jboss.
+ *
+ * If Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS are set,
+ * this InitialContextFactory implementation combines the
+ * authentication phase with the InitialContext creation. During the
+ * getInitialContext callback from the JNDI naming, layer security context
+ * identity is populated with the username obtained from the
+ * Context.SECURITY_PRINCIPAL env property and the credentials from the
+ * Context.SECURITY_CREDENTIALS env property. There is no actual authentication
+ * of this information. It is merely made available to the jboss transport
+ * layer for incorporation into subsequent invocations. Authentication and
+ * authorization will occur on the server.
+ *
+ * If Context.SECURITY_PROTOCOL is provided as well as the principal and credentials,
+ * then a JAAS login will be performed instead using the security domain provided with the
+ * SECURITY_PROTOCOL variable.
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class KernelInitializingContextFactory extends JBossRemotingContextFactory
+{
+   public static boolean initialized = false;
+   public static final String BOOTSTRAP_RESOURCE_PATH = "jboss.embedded.resource.path";
+
+   public static synchronized void bootstrapEmbeddedKernel(Hashtable env)
+   {
+      if (initialized == false)
+      {
+         initialized = true;
+         String bootstrapResourcePath = (String) env.get(BOOTSTRAP_RESOURCE_PATH);
+         try
+         {
+            if (bootstrapResourcePath != null)
+            {
+               Bootstrap.getInstance().bootstrap(bootstrapResourcePath);
+            }
+            else
+            {
+               Bootstrap.getInstance().bootstrap();
+            }
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException("Unable to bootstrap JBoss kernel", e);
+         }
+      }
+   }
+
+   // InitialContextFactory implementation --------------------------
+   public Context getInitialContext(Hashtable env) throws NamingException
+   {
+      KernelInitializingContextFactory.bootstrapEmbeddedKernel(env);
+      return super.getInitialContext(env);
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/jndi/KernelInitializingContextFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/jndi/WrappingContext.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/jndi/WrappingContext.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/jndi/WrappingContext.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,226 +1,226 @@
-/*
- * 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.embedded.jndi;
-
-import java.util.Hashtable;
-import javax.naming.Binding;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NameClassPair;
-import javax.naming.NameParser;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class WrappingContext implements Context
-{
-   private Context namingContext;
-
-   public WrappingContext(Context namingContext)
-   {
-      this.namingContext = namingContext;
-   }
-
-   public Object lookup(Name name)
-           throws NamingException
-   {
-      return getNamingContext().lookup(name);
-   }
-
-   public Object lookup(String name)
-           throws NamingException
-   {
-      return getNamingContext().lookup(name);
-   }
-
-   public void bind(Name name, Object obj)
-           throws NamingException
-   {
-      getNamingContext().bind(name, obj);
-   }
-
-   public void bind(String name, Object obj)
-           throws NamingException
-   {
-      getNamingContext().bind(name, obj);
-   }
-
-   public void rebind(Name name, Object obj)
-           throws NamingException
-   {
-      getNamingContext().rebind(name, obj);
-   }
-
-   public void rebind(String name, Object obj)
-           throws NamingException
-   {
-      getNamingContext().rebind(name, obj);
-   }
-
-   public void unbind(Name name)
-           throws NamingException
-   {
-      getNamingContext().unbind(name);
-   }
-
-   public void unbind(String name)
-           throws NamingException
-   {
-      getNamingContext().unbind(name);
-   }
-
-   public void rename(Name oldName, Name newName)
-           throws NamingException
-   {
-      getNamingContext().rename(oldName, newName);
-   }
-
-   public void rename(String oldName, String newName)
-           throws NamingException
-   {
-      getNamingContext().rename(oldName, newName);
-   }
-
-   public NamingEnumeration<NameClassPair> list(Name name)
-           throws NamingException
-   {
-      return getNamingContext().list(name);
-   }
-
-   public NamingEnumeration<NameClassPair> list(String name)
-           throws NamingException
-   {
-      return getNamingContext().list(name);
-   }
-
-   public NamingEnumeration<Binding> listBindings(Name name)
-           throws NamingException
-   {
-      return getNamingContext().listBindings(name);
-   }
-
-   public NamingEnumeration<Binding> listBindings(String name)
-           throws NamingException
-   {
-      return getNamingContext().listBindings(name);
-   }
-
-   public void destroySubcontext(Name name)
-           throws NamingException
-   {
-      getNamingContext().destroySubcontext(name);
-   }
-
-   public void destroySubcontext(String name)
-           throws NamingException
-   {
-      getNamingContext().destroySubcontext(name);
-   }
-
-   public Context createSubcontext(Name name)
-           throws NamingException
-   {
-      return getNamingContext().createSubcontext(name);
-   }
-
-   public Context createSubcontext(String name)
-           throws NamingException
-   {
-      return getNamingContext().createSubcontext(name);
-   }
-
-   public Object lookupLink(Name name)
-           throws NamingException
-   {
-      return getNamingContext().lookupLink(name);
-   }
-
-   public Object lookupLink(String name)
-           throws NamingException
-   {
-      return getNamingContext().lookupLink(name);
-   }
-
-   public NameParser getNameParser(Name name)
-           throws NamingException
-   {
-      return getNamingContext().getNameParser(name);
-   }
-
-   public NameParser getNameParser(String name)
-           throws NamingException
-   {
-      return getNamingContext().getNameParser(name);
-   }
-
-   public Name composeName(Name name, Name prefix)
-           throws NamingException
-   {
-      return getNamingContext().composeName(name, prefix);
-   }
-
-   public String composeName(String name, String prefix)
-           throws NamingException
-   {
-      return getNamingContext().composeName(name, prefix);
-   }
-
-   public Object addToEnvironment(String propName, Object propVal)
-           throws NamingException
-   {
-      return getNamingContext().addToEnvironment(propName, propVal);
-   }
-
-   public Object removeFromEnvironment(String propName)
-           throws NamingException
-   {
-      return getNamingContext().removeFromEnvironment(propName);
-   }
-
-   public Hashtable<?, ?> getEnvironment()
-           throws NamingException
-   {
-      return getNamingContext().getEnvironment();
-   }
-
-   public void close()
-           throws NamingException
-   {
-      getNamingContext().close();
-   }
-
-   public String getNameInNamespace()
-           throws NamingException
-   {
-      return getNamingContext().getNameInNamespace();
-   }
-
-   protected Context getNamingContext()
-   {
-      return namingContext;
-   }
-}
+/*
+ * 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.embedded.jndi;
+
+import java.util.Hashtable;
+import javax.naming.Binding;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NameClassPair;
+import javax.naming.NameParser;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappingContext implements Context
+{
+   private Context namingContext;
+
+   public WrappingContext(Context namingContext)
+   {
+      this.namingContext = namingContext;
+   }
+
+   public Object lookup(Name name)
+           throws NamingException
+   {
+      return getNamingContext().lookup(name);
+   }
+
+   public Object lookup(String name)
+           throws NamingException
+   {
+      return getNamingContext().lookup(name);
+   }
+
+   public void bind(Name name, Object obj)
+           throws NamingException
+   {
+      getNamingContext().bind(name, obj);
+   }
+
+   public void bind(String name, Object obj)
+           throws NamingException
+   {
+      getNamingContext().bind(name, obj);
+   }
+
+   public void rebind(Name name, Object obj)
+           throws NamingException
+   {
+      getNamingContext().rebind(name, obj);
+   }
+
+   public void rebind(String name, Object obj)
+           throws NamingException
+   {
+      getNamingContext().rebind(name, obj);
+   }
+
+   public void unbind(Name name)
+           throws NamingException
+   {
+      getNamingContext().unbind(name);
+   }
+
+   public void unbind(String name)
+           throws NamingException
+   {
+      getNamingContext().unbind(name);
+   }
+
+   public void rename(Name oldName, Name newName)
+           throws NamingException
+   {
+      getNamingContext().rename(oldName, newName);
+   }
+
+   public void rename(String oldName, String newName)
+           throws NamingException
+   {
+      getNamingContext().rename(oldName, newName);
+   }
+
+   public NamingEnumeration<NameClassPair> list(Name name)
+           throws NamingException
+   {
+      return getNamingContext().list(name);
+   }
+
+   public NamingEnumeration<NameClassPair> list(String name)
+           throws NamingException
+   {
+      return getNamingContext().list(name);
+   }
+
+   public NamingEnumeration<Binding> listBindings(Name name)
+           throws NamingException
+   {
+      return getNamingContext().listBindings(name);
+   }
+
+   public NamingEnumeration<Binding> listBindings(String name)
+           throws NamingException
+   {
+      return getNamingContext().listBindings(name);
+   }
+
+   public void destroySubcontext(Name name)
+           throws NamingException
+   {
+      getNamingContext().destroySubcontext(name);
+   }
+
+   public void destroySubcontext(String name)
+           throws NamingException
+   {
+      getNamingContext().destroySubcontext(name);
+   }
+
+   public Context createSubcontext(Name name)
+           throws NamingException
+   {
+      return getNamingContext().createSubcontext(name);
+   }
+
+   public Context createSubcontext(String name)
+           throws NamingException
+   {
+      return getNamingContext().createSubcontext(name);
+   }
+
+   public Object lookupLink(Name name)
+           throws NamingException
+   {
+      return getNamingContext().lookupLink(name);
+   }
+
+   public Object lookupLink(String name)
+           throws NamingException
+   {
+      return getNamingContext().lookupLink(name);
+   }
+
+   public NameParser getNameParser(Name name)
+           throws NamingException
+   {
+      return getNamingContext().getNameParser(name);
+   }
+
+   public NameParser getNameParser(String name)
+           throws NamingException
+   {
+      return getNamingContext().getNameParser(name);
+   }
+
+   public Name composeName(Name name, Name prefix)
+           throws NamingException
+   {
+      return getNamingContext().composeName(name, prefix);
+   }
+
+   public String composeName(String name, String prefix)
+           throws NamingException
+   {
+      return getNamingContext().composeName(name, prefix);
+   }
+
+   public Object addToEnvironment(String propName, Object propVal)
+           throws NamingException
+   {
+      return getNamingContext().addToEnvironment(propName, propVal);
+   }
+
+   public Object removeFromEnvironment(String propName)
+           throws NamingException
+   {
+      return getNamingContext().removeFromEnvironment(propName);
+   }
+
+   public Hashtable<?, ?> getEnvironment()
+           throws NamingException
+   {
+      return getNamingContext().getEnvironment();
+   }
+
+   public void close()
+           throws NamingException
+   {
+      getNamingContext().close();
+   }
+
+   public String getNameInNamespace()
+           throws NamingException
+   {
+      return getNamingContext().getNameInNamespace();
+   }
+
+   protected Context getNamingContext()
+   {
+      return namingContext;
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/jndi/WrappingContext.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/junit/BaseTestCase.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/junit/BaseTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/junit/BaseTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,162 +1,162 @@
-/*
- * 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.embedded.junit;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.jboss.embedded.Bootstrap;
-
-import java.lang.reflect.Method;
-import java.util.HashSet;
-
-/**
- * This base TestCase class will automatically
- * 1. bootstrap Embedded JBoss
- * 2. Call static methods deploy() and undeploy() of the class at setup() and tearDown()
- *
- * If the preProcessedTest() method is used, this creates a TestSetup that will skip step 2 above
- * and instead call the static deploy() method before any test methods are run in the class.  Undeploy() will
- * be called when all test methods of the class are finished.
- *
- * This class was designed so that all tests within the class can be run at once from your IDE, or just one test method.
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class BaseTestCase extends TestCase
-{
-
-   public BaseTestCase()
-   {
-   }
-
-   public BaseTestCase(String string)
-   {
-      super(string);
-   }
-
-   private static HashSet flagged = new HashSet();
-
-   @Override
-   protected void setUp() throws Exception
-   {
-      super.setUp();
-      if (flagged.contains(this.getClass())) return;
-      bootstrap();
-      try
-      {
-         Method deploy = this.getClass().getMethod("deploy");
-         deploy.invoke(null);
-      }
-      catch (NoSuchMethodException ignored)
-      {
-      }
-   }
-
-   @Override
-   protected void tearDown() throws Exception
-   {
-      super.tearDown();
-      if (flagged.contains(this.getClass())) return;
-      try
-      {
-         Method undeploy = this.getClass().getMethod("undeploy");
-         undeploy.invoke(null);
-      }
-      catch (NoSuchMethodException ignored)
-      {
-      }
-      if (System.getProperty("shutdown.embedded.jboss") != null) Bootstrap.getInstance().shutdown();
-   }
-
-   private static void bootstrap()
-   {
-      if (Bootstrap.getInstance().isStarted()) return;
-
-      try
-      {
-         Bootstrap.getInstance().bootstrap();
-      }
-      catch (Exception error)
-      {
-         throw new RuntimeException("Failed to bootstrap", error);
-      }
-   }
-
-   /**
-    * Use this in a static suite() method in your test class to
-    * bootstrap and deploy your modules before any tests run.
-    *
-    *
-    * @param testClass
-    * @return
-    */
-   public static Test preProcessedTest(final Class testClass)
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(testClass);
-
-      return new TestSetup(suite)
-      {
-         @Override
-         protected void setUp() throws Exception
-         {
-            super.setUp();
-            bootstrap();
-            try
-            {
-               Method deploy = testClass.getMethod("deploy");
-               deploy.invoke(null);
-            }
-            catch (NoSuchMethodException ignored)
-            {
-            }
-            flagged.add(testClass);
-         }
-
-         @Override
-         protected void tearDown() throws Exception
-         {
-            try
-            {
-               Method undeploy = null;
-               try
-               {
-                  undeploy = testClass.getMethod("undeploy");
-                  undeploy.invoke(null);
-               }
-               catch (NoSuchMethodException ignored)
-               {
-               }
-               if (System.getProperty("shutdown.embedded.jboss") != null) Bootstrap.getInstance().shutdown();
-               super.tearDown();
-            }
-            finally
-            {
-               flagged.remove(testClass);
-            }
-         }
-      };
-   }
-}
+/*
+ * 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.embedded.junit;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.jboss.embedded.Bootstrap;
+
+import java.lang.reflect.Method;
+import java.util.HashSet;
+
+/**
+ * This base TestCase class will automatically
+ * 1. bootstrap Embedded JBoss
+ * 2. Call static methods deploy() and undeploy() of the class at setup() and tearDown()
+ *
+ * If the preProcessedTest() method is used, this creates a TestSetup that will skip step 2 above
+ * and instead call the static deploy() method before any test methods are run in the class.  Undeploy() will
+ * be called when all test methods of the class are finished.
+ *
+ * This class was designed so that all tests within the class can be run at once from your IDE, or just one test method.
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class BaseTestCase extends TestCase
+{
+
+   public BaseTestCase()
+   {
+   }
+
+   public BaseTestCase(String string)
+   {
+      super(string);
+   }
+
+   private static HashSet flagged = new HashSet();
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      if (flagged.contains(this.getClass())) return;
+      bootstrap();
+      try
+      {
+         Method deploy = this.getClass().getMethod("deploy");
+         deploy.invoke(null);
+      }
+      catch (NoSuchMethodException ignored)
+      {
+      }
+   }
+
+   @Override
+   protected void tearDown() throws Exception
+   {
+      super.tearDown();
+      if (flagged.contains(this.getClass())) return;
+      try
+      {
+         Method undeploy = this.getClass().getMethod("undeploy");
+         undeploy.invoke(null);
+      }
+      catch (NoSuchMethodException ignored)
+      {
+      }
+      if (System.getProperty("shutdown.embedded.jboss") != null) Bootstrap.getInstance().shutdown();
+   }
+
+   private static void bootstrap()
+   {
+      if (Bootstrap.getInstance().isStarted()) return;
+
+      try
+      {
+         Bootstrap.getInstance().bootstrap();
+      }
+      catch (Exception error)
+      {
+         throw new RuntimeException("Failed to bootstrap", error);
+      }
+   }
+
+   /**
+    * Use this in a static suite() method in your test class to
+    * bootstrap and deploy your modules before any tests run.
+    *
+    *
+    * @param testClass
+    * @return
+    */
+   public static Test preProcessedTest(final Class testClass)
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(testClass);
+
+      return new TestSetup(suite)
+      {
+         @Override
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            bootstrap();
+            try
+            {
+               Method deploy = testClass.getMethod("deploy");
+               deploy.invoke(null);
+            }
+            catch (NoSuchMethodException ignored)
+            {
+            }
+            flagged.add(testClass);
+         }
+
+         @Override
+         protected void tearDown() throws Exception
+         {
+            try
+            {
+               Method undeploy = null;
+               try
+               {
+                  undeploy = testClass.getMethod("undeploy");
+                  undeploy.invoke(null);
+               }
+               catch (NoSuchMethodException ignored)
+               {
+               }
+               if (System.getProperty("shutdown.embedded.jboss") != null) Bootstrap.getInstance().shutdown();
+               super.tearDown();
+            }
+            finally
+            {
+               flagged.remove(testClass);
+            }
+         }
+      };
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/junit/BaseTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/junit/ClasspathBasedTestServices.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/junit/ClasspathBasedTestServices.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/junit/ClasspathBasedTestServices.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,106 +1,106 @@
-/*
- * 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.embedded.junit;
-
-import org.jboss.test.JBossTestServices;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.adapters.JMXKernel;
-
-import javax.management.MBeanServerConnection;
-import java.net.URL;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class ClasspathBasedTestServices extends JBossTestServices
-{
-   private boolean top;
-   private Bootstrap bootstrap;
-
-   public ClasspathBasedTestServices(String className)
-   {
-      super(className);
-   }
-
-   public ClasspathBasedTestServices(Class clazz)
-   {
-      super(clazz);
-   }
-
-
-   @Override
-   public void setUp() throws Exception
-   {
-      bootstrap = Bootstrap.getInstance();
-      if (!bootstrap.isStarted())
-      {
-         bootstrap.bootstrap();
-         top = true;
-      }
-      super.setUp();
-   }
-
-   @Override
-   public void tearDown() throws Exception
-   {
-      super.tearDown();
-      if (top) bootstrap.shutdown();
-   }
-
-
-   @Override
-   public MBeanServerConnection getServer() throws Exception
-   {
-      if (server == null)
-      {
-         JMXKernel jmxKernel = (JMXKernel)bootstrap.getKernel().getRegistry().getEntry("JMXKernel").getTarget();
-         server = jmxKernel.getMbeanServer();
-      }
-      return server;
-   }
-
-   @Override
-   public void deploy(String name) throws Exception
-   {
-      URL url = getDeployURL(name);
-      bootstrap.deploy(url);
-   }
-
-   @Override
-   public void redeploy(String name) throws Exception
-   {
-      URL url = getDeployURL(name);
-      bootstrap.deploy(url);
-   }
-
-   @Override
-   public void undeploy(String name) throws Exception
-   {
-      URL url = getDeployURL(name);
-      bootstrap.undeploy(url);
-   }
-
-
-}
+/*
+ * 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.embedded.junit;
+
+import org.jboss.test.JBossTestServices;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.adapters.JMXKernel;
+
+import javax.management.MBeanServerConnection;
+import java.net.URL;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClasspathBasedTestServices extends JBossTestServices
+{
+   private boolean top;
+   private Bootstrap bootstrap;
+
+   public ClasspathBasedTestServices(String className)
+   {
+      super(className);
+   }
+
+   public ClasspathBasedTestServices(Class clazz)
+   {
+      super(clazz);
+   }
+
+
+   @Override
+   public void setUp() throws Exception
+   {
+      bootstrap = Bootstrap.getInstance();
+      if (!bootstrap.isStarted())
+      {
+         bootstrap.bootstrap();
+         top = true;
+      }
+      super.setUp();
+   }
+
+   @Override
+   public void tearDown() throws Exception
+   {
+      super.tearDown();
+      if (top) bootstrap.shutdown();
+   }
+
+
+   @Override
+   public MBeanServerConnection getServer() throws Exception
+   {
+      if (server == null)
+      {
+         JMXKernel jmxKernel = (JMXKernel)bootstrap.getKernel().getRegistry().getEntry("JMXKernel").getTarget();
+         server = jmxKernel.getMbeanServer();
+      }
+      return server;
+   }
+
+   @Override
+   public void deploy(String name) throws Exception
+   {
+      URL url = getDeployURL(name);
+      bootstrap.deploy(url);
+   }
+
+   @Override
+   public void redeploy(String name) throws Exception
+   {
+      URL url = getDeployURL(name);
+      bootstrap.deploy(url);
+   }
+
+   @Override
+   public void undeploy(String name) throws Exception
+   {
+      URL url = getDeployURL(name);
+      bootstrap.undeploy(url);
+   }
+
+
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/junit/ClasspathBasedTestServices.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestCase.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,58 +1,58 @@
-/*
- * 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.embedded.junit;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.jboss.test.JBossTestCase;
-import org.jboss.test.AbstractTestDelegate;
-
-/**
- * Base test class that extends JBossTestCase
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class EmbeddedTestCase extends JBossTestCase
-{
-   public EmbeddedTestCase(String name)
-   {
-      super(name);
-   }
-
-   public static Test getAdaptedSetup(final Class clazz, final String jarName)
-      throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTest(new TestSuite(clazz));
-      return getDeploySetup(EmbeddedTestCase.class, suite, jarName);
-   }
-
-   /**
-    * Overriden to return JBossTestServices as the test delegate.
-    */
-   public static AbstractTestDelegate getDelegate(Class clazz) throws Exception
-   {
-      AbstractTestDelegate delegate = new ClasspathBasedTestServices(clazz);
-      return delegate;
-   }
-}
+/*
+ * 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.embedded.junit;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.AbstractTestDelegate;
+
+/**
+ * Base test class that extends JBossTestCase
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class EmbeddedTestCase extends JBossTestCase
+{
+   public EmbeddedTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test getAdaptedSetup(final Class clazz, final String jarName)
+      throws Exception
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTest(new TestSuite(clazz));
+      return getDeploySetup(EmbeddedTestCase.class, suite, jarName);
+   }
+
+   /**
+    * Overriden to return JBossTestServices as the test delegate.
+    */
+   public static AbstractTestDelegate getDelegate(Class clazz) throws Exception
+   {
+      AbstractTestDelegate delegate = new ClasspathBasedTestServices(clazz);
+      return delegate;
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestSetup.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestSetup.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestSetup.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,193 +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.embedded.junit;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.DeploymentGroup;
-import org.jboss.deployers.spi.DeploymentException;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class EmbeddedTestSetup extends TestSetup
-{
-   public EmbeddedTestSetup(Test test)
-   {
-      super(test);
-   }
-
-   protected void setUp()
-   {
-      testSetup();
-   }
-
-   public static void testSetup()
-   {
-      if (Bootstrap.getInstance().isStarted()) return;
-
-      try
-      {
-         Bootstrap.getInstance().bootstrap();
-      }
-      catch (Exception error)
-      {
-         throw new RuntimeException("Failed to bootstrap", error);
-      }
-   }
-
-   public static void testTearDown()
-   {
-      
-   }
-
-   protected void tearDown()
-   {
-   }
-
-
-   /**
-    * Returns a wrapper that will only bootstrap embedded if VM hasn't already bootstrapped
-    *
-    * @param testClass
-    * @return
-    */
-   public static Test getWrapper(Class testClass)
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(testClass);
-
-      // setup test so that embedded JBoss is started/stopped once for all tests here.
-      return new EmbeddedTestSetup(suite);
-   }
-
-   /**
-    * Returns a wrapper that will only bootstrap embedded if VM hasn't already bootstrapped
-    * Deploys items represented in classpath as staed in DeploymentGroup.addClasspath
-    *
-    * @param testClass
-    * @param classpaths
-    * @return
-    */
-   public static Test deployClasspath(Class testClass, final String classpaths)
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(testClass);
-
-      return new EmbeddedTestSetup(suite)
-      {
-         DeploymentGroup group;
-
-         @Override
-         protected void setUp()
-         {
-            super.setUp();
-            try
-            {
-               group = Bootstrap.getInstance().createDeploymentGroup();
-               group.addClasspath(classpaths);
-               group.process();
-            }
-            catch (DeploymentException e)
-            {
-               throw new RuntimeException("Unable to deploy classpath: " + classpaths, e);
-            }
-         }
-
-         @Override
-         protected void tearDown()
-         {
-            try
-            {
-               group.undeploy();
-            }
-            catch (DeploymentException e)
-            {
-               throw new RuntimeException("Unable to undeploy classpath: " + classpaths, e);
-            }
-            super.tearDown();
-         }
-      };
-   }
-
-   /**
-    * Returns a wrapper that will only bootstrap embedded if VM hasn't already bootstrapped
-    * Deploys items represented in resource list
-    *
-    * @param testClass
-    * @param resources
-    * @return
-    */
-   public static Test deployResource(Class testClass, final String... resources)
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(testClass);
-
-      return new EmbeddedTestSetup(suite)
-      {
-         DeploymentGroup group;
-
-         @Override
-         protected void setUp()
-         {
-            super.setUp();
-            try
-            {
-               group = Bootstrap.getInstance().createDeploymentGroup();
-               for (String resource : resources)
-               {
-                  group.addResource(resource);
-               }
-               group.process();
-            }
-            catch (DeploymentException e)
-            {
-               String message = "Unable to deploy resources:";
-               for (String resource : resources)
-               {
-                  message += " " + resource;
-               }
-               throw new RuntimeException(message, e);
-            }
-         }
-
-         @Override
-         protected void tearDown()
-         {
-            try
-            {
-               group.undeploy();
-            }
-            catch (DeploymentException e)
-            {
-               throw new RuntimeException("Unable to undeploy resources: " + resources, e);
-            }
-            super.tearDown();
-         }
-      };
-   }
-}
+/*
+ * 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.embedded.junit;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.DeploymentGroup;
+import org.jboss.deployers.spi.DeploymentException;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class EmbeddedTestSetup extends TestSetup
+{
+   public EmbeddedTestSetup(Test test)
+   {
+      super(test);
+   }
+
+   protected void setUp()
+   {
+      testSetup();
+   }
+
+   public static void testSetup()
+   {
+      if (Bootstrap.getInstance().isStarted()) return;
+
+      try
+      {
+         Bootstrap.getInstance().bootstrap();
+      }
+      catch (Exception error)
+      {
+         throw new RuntimeException("Failed to bootstrap", error);
+      }
+   }
+
+   public static void testTearDown()
+   {
+      
+   }
+
+   protected void tearDown()
+   {
+   }
+
+
+   /**
+    * Returns a wrapper that will only bootstrap embedded if VM hasn't already bootstrapped
+    *
+    * @param testClass
+    * @return
+    */
+   public static Test getWrapper(Class testClass)
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(testClass);
+
+      // setup test so that embedded JBoss is started/stopped once for all tests here.
+      return new EmbeddedTestSetup(suite);
+   }
+
+   /**
+    * Returns a wrapper that will only bootstrap embedded if VM hasn't already bootstrapped
+    * Deploys items represented in classpath as staed in DeploymentGroup.addClasspath
+    *
+    * @param testClass
+    * @param classpaths
+    * @return
+    */
+   public static Test deployClasspath(Class testClass, final String classpaths)
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(testClass);
+
+      return new EmbeddedTestSetup(suite)
+      {
+         DeploymentGroup group;
+
+         @Override
+         protected void setUp()
+         {
+            super.setUp();
+            try
+            {
+               group = Bootstrap.getInstance().createDeploymentGroup();
+               group.addClasspath(classpaths);
+               group.process();
+            }
+            catch (DeploymentException e)
+            {
+               throw new RuntimeException("Unable to deploy classpath: " + classpaths, e);
+            }
+         }
+
+         @Override
+         protected void tearDown()
+         {
+            try
+            {
+               group.undeploy();
+            }
+            catch (DeploymentException e)
+            {
+               throw new RuntimeException("Unable to undeploy classpath: " + classpaths, e);
+            }
+            super.tearDown();
+         }
+      };
+   }
+
+   /**
+    * Returns a wrapper that will only bootstrap embedded if VM hasn't already bootstrapped
+    * Deploys items represented in resource list
+    *
+    * @param testClass
+    * @param resources
+    * @return
+    */
+   public static Test deployResource(Class testClass, final String... resources)
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(testClass);
+
+      return new EmbeddedTestSetup(suite)
+      {
+         DeploymentGroup group;
+
+         @Override
+         protected void setUp()
+         {
+            super.setUp();
+            try
+            {
+               group = Bootstrap.getInstance().createDeploymentGroup();
+               for (String resource : resources)
+               {
+                  group.addResource(resource);
+               }
+               group.process();
+            }
+            catch (DeploymentException e)
+            {
+               String message = "Unable to deploy resources:";
+               for (String resource : resources)
+               {
+                  message += " " + resource;
+               }
+               throw new RuntimeException(message, e);
+            }
+         }
+
+         @Override
+         protected void tearDown()
+         {
+            try
+            {
+               group.undeploy();
+            }
+            catch (DeploymentException e)
+            {
+               throw new RuntimeException("Unable to undeploy resources: " + resources, e);
+            }
+            super.tearDown();
+         }
+      };
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/junit/EmbeddedTestSetup.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/EmbeddedJBossBootstrapListener.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/tomcat/EmbeddedJBossBootstrapListener.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/tomcat/EmbeddedJBossBootstrapListener.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,88 +1,88 @@
-/*
- * 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.embedded.tomcat;
-
-import java.net.URL;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.tomcat.jndi.ENCFactory;
-import org.jboss.embedded.tomcat.jndi.TomcatBridgeContextFactory;
-import org.jboss.embedded.url.JavaProtocolHandlerPkgs;
-import org.jboss.net.protocol.URLStreamHandlerFactory;
-
-/**
- * Tomcat Listener that initializes embedded jboss.
- *
- * It resets the JNDI context factory as well as URL_PKG_PREFIXES
- *
- * It sets up URL.setURLStreamHandlerFactory to be a jboss supplied one but
- * it does append org.apache.naming.resources to the pkgs.
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class EmbeddedJBossBootstrapListener implements LifecycleListener
-{
-   public void lifecycleEvent(LifecycleEvent event)
-   {
-      if (Lifecycle.START_EVENT.equals(event.getType()))
-      {                                                                                            
-         innerStart();
-      }
-      else if (Lifecycle.AFTER_STOP_EVENT.equals(event.getType()))
-      {
-         innerStop();
-      }
-   }
-
-   protected void innerStart()
-   {
-      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, TomcatBridgeContextFactory.class.getName());
-      System.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming");
-
-      String[] protocolPkgs = {
-              "org.apache.naming.resources"
-      };
-      JavaProtocolHandlerPkgs.setupHandlerPkgs(protocolPkgs);
-      URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory());
-      try
-      {
-         Bootstrap.getInstance().bootstrap();
-         InitialContext ctx = new InitialContext();
-         ENCFactory.rebindComp(ctx);
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   protected void innerStop()
-   {
-      Bootstrap.getInstance().shutdown();
-   }
-}
+/*
+ * 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.embedded.tomcat;
+
+import java.net.URL;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.tomcat.jndi.ENCFactory;
+import org.jboss.embedded.tomcat.jndi.TomcatBridgeContextFactory;
+import org.jboss.embedded.url.JavaProtocolHandlerPkgs;
+import org.jboss.net.protocol.URLStreamHandlerFactory;
+
+/**
+ * Tomcat Listener that initializes embedded jboss.
+ *
+ * It resets the JNDI context factory as well as URL_PKG_PREFIXES
+ *
+ * It sets up URL.setURLStreamHandlerFactory to be a jboss supplied one but
+ * it does append org.apache.naming.resources to the pkgs.
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class EmbeddedJBossBootstrapListener implements LifecycleListener
+{
+   public void lifecycleEvent(LifecycleEvent event)
+   {
+      if (Lifecycle.START_EVENT.equals(event.getType()))
+      {                                                                                            
+         innerStart();
+      }
+      else if (Lifecycle.AFTER_STOP_EVENT.equals(event.getType()))
+      {
+         innerStop();
+      }
+   }
+
+   protected void innerStart()
+   {
+      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, TomcatBridgeContextFactory.class.getName());
+      System.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming");
+
+      String[] protocolPkgs = {
+              "org.apache.naming.resources"
+      };
+      JavaProtocolHandlerPkgs.setupHandlerPkgs(protocolPkgs);
+      URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory());
+      try
+      {
+         Bootstrap.getInstance().bootstrap();
+         InitialContext ctx = new InitialContext();
+         ENCFactory.rebindComp(ctx);
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+
+   protected void innerStop()
+   {
+      Bootstrap.getInstance().shutdown();
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/EmbeddedJBossBootstrapListener.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/WebinfScanner.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/tomcat/WebinfScanner.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/tomcat/WebinfScanner.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,126 +1,126 @@
-/*
- * 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.embedded.tomcat;
-
-import java.io.File;
-import java.lang.reflect.Method;
-
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.core.StandardContext;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.DeploymentGroup;
-
-/**
- * Searches for WAR's WEB-INF directory and deploys that directory.
- * A JBoss DeploymentContext is created and the StandardContext is added as an attachment
- *
- * This listener assumes an exploded deployment, in other words, that WEB-INF/ is
- * a directory in a file system.
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision: 1.1 $
- */
-public class WebinfScanner implements LifecycleListener
-{
-   private DeploymentGroup group;
-
-   public void lifecycleEvent(LifecycleEvent event)
-   {
-      if (event.getType().equals(Lifecycle.START_EVENT))
-      {
-         if (!(event.getSource() instanceof StandardContext))
-            return;
-
-         StandardContext container = (StandardContext)event.getSource();
-         container.getLoader().getClassLoader();
-         Method getBasePath = getBasePathMethod();
-         String basePath;
-         try
-         {
-            basePath = (String)getBasePath.invoke(container);
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException(e);
-         }
-
-         File webInf = new File(basePath, "WEB-INF");
-         File webInfLib = new File(webInf, "lib");
-         File webInfClasses = new File(webInf, "classes");
-
-         group = Bootstrap.getInstance().createDeploymentGroup();
-         try
-         {
-            if (webInfLib.exists())
-            {
-               group.add(webInfLib.toURL());
-            }
-            if (webInfClasses.exists())
-            {
-               group.add(webInfClasses.toURL());
-            }
-            for (DeploymentUnit deployment : group.getDeploymentUnits())
-            {
-               deployment.getTransientManagedObjects().addAttachment(StandardContext.class, container);
-            }
-            group.process();
-         }
-         catch (Exception e)
-         {
-            throw new RuntimeException(e);
-         }
-      }
-      else if (event.getType().equals(Lifecycle.STOP_EVENT))
-      {
-         try
-         {
-            group.undeploy();
-         }
-         catch (DeploymentException e)
-         {
-            throw new RuntimeException(e);
-         }
-      }
-   }
-
-   private static Method basePathMethod;
-
-   private static synchronized Method getBasePathMethod()
-   {
-      if (basePathMethod != null) return basePathMethod;
-      try
-      {
-         basePathMethod = StandardContext.class.getDeclaredMethod("getBasePath");
-      }
-      catch (NoSuchMethodException e)
-      {
-         throw new RuntimeException(e);
-      }
-      basePathMethod.setAccessible(true);
-      return basePathMethod;
-   }
-}
+/*
+ * 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.embedded.tomcat;
+
+import java.io.File;
+import java.lang.reflect.Method;
+
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.catalina.core.StandardContext;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.DeploymentGroup;
+
+/**
+ * Searches for WAR's WEB-INF directory and deploys that directory.
+ * A JBoss DeploymentContext is created and the StandardContext is added as an attachment
+ *
+ * This listener assumes an exploded deployment, in other words, that WEB-INF/ is
+ * a directory in a file system.
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @author adrian at jboss.org
+ * @version $Revision: 1.1 $
+ */
+public class WebinfScanner implements LifecycleListener
+{
+   private DeploymentGroup group;
+
+   public void lifecycleEvent(LifecycleEvent event)
+   {
+      if (event.getType().equals(Lifecycle.START_EVENT))
+      {
+         if (!(event.getSource() instanceof StandardContext))
+            return;
+
+         StandardContext container = (StandardContext)event.getSource();
+         container.getLoader().getClassLoader();
+         Method getBasePath = getBasePathMethod();
+         String basePath;
+         try
+         {
+            basePath = (String)getBasePath.invoke(container);
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException(e);
+         }
+
+         File webInf = new File(basePath, "WEB-INF");
+         File webInfLib = new File(webInf, "lib");
+         File webInfClasses = new File(webInf, "classes");
+
+         group = Bootstrap.getInstance().createDeploymentGroup();
+         try
+         {
+            if (webInfLib.exists())
+            {
+               group.add(webInfLib.toURL());
+            }
+            if (webInfClasses.exists())
+            {
+               group.add(webInfClasses.toURL());
+            }
+            for (DeploymentUnit deployment : group.getDeploymentUnits())
+            {
+               deployment.getTransientManagedObjects().addAttachment(StandardContext.class, container);
+            }
+            group.process();
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+      else if (event.getType().equals(Lifecycle.STOP_EVENT))
+      {
+         try
+         {
+            group.undeploy();
+         }
+         catch (DeploymentException e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+   }
+
+   private static Method basePathMethod;
+
+   private static synchronized Method getBasePathMethod()
+   {
+      if (basePathMethod != null) return basePathMethod;
+      try
+      {
+         basePathMethod = StandardContext.class.getDeclaredMethod("getBasePath");
+      }
+      catch (NoSuchMethodException e)
+      {
+         throw new RuntimeException(e);
+      }
+      basePathMethod.setAccessible(true);
+      return basePathMethod;
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/WebinfScanner.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/ENCFactory.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/ENCFactory.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/ENCFactory.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,76 +1,76 @@
-/*
- * 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.embedded.tomcat.jndi;
-
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.RefAddr;
-import javax.naming.Reference;
-import javax.naming.StringRefAddr;
-
-import org.apache.naming.java.javaURLContextFactory;
-
-/**
- * We look to see if a threadlocal tag is set, if so, just use JBoss java:comp resolving.
- * If it is not set, then obtain a reference to "java:" and lookup "comp"
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class ENCFactory extends org.jboss.naming.ENCFactory
-{
-   private static boolean initialized;
-
-   private javaURLContextFactory apache = new javaURLContextFactory();
-
-   /**
-    * Convience function.  Rebinds java:comp to this class just in case an existing
-    * jboss configuration already bound java:comp.  This is so we don't have to have
-    * multiple copies of jboss configuration files.
-    *
-    * @param jbossContext
-    * @throws NamingException
-    */
-   public static synchronized void rebindComp(Context jbossContext) throws NamingException
-   {
-      if (initialized)
-         return;
-
-      initialized = true;
-      RefAddr refAddr = new StringRefAddr("nns", "ENC");
-      Reference envRef = new Reference("javax.naming.Context", refAddr, ENCFactory.class.getName(), null);
-      Context ctx = (Context)jbossContext.lookup("java:");
-      ctx.rebind("comp", envRef);
-   }
-
-   @Override
-   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
-   {
-      if (getCurrentId() != null)
-      {
-         return super.getObjectInstance(obj, name, nameCtx, environment);
-      }
-      return apache.getInitialContext(environment).lookup("java:comp");
-   }
-}
+/*
+ * 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.embedded.tomcat.jndi;
+
+import java.util.Hashtable;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.StringRefAddr;
+
+import org.apache.naming.java.javaURLContextFactory;
+
+/**
+ * We look to see if a threadlocal tag is set, if so, just use JBoss java:comp resolving.
+ * If it is not set, then obtain a reference to "java:" and lookup "comp"
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class ENCFactory extends org.jboss.naming.ENCFactory
+{
+   private static boolean initialized;
+
+   private javaURLContextFactory apache = new javaURLContextFactory();
+
+   /**
+    * Convience function.  Rebinds java:comp to this class just in case an existing
+    * jboss configuration already bound java:comp.  This is so we don't have to have
+    * multiple copies of jboss configuration files.
+    *
+    * @param jbossContext
+    * @throws NamingException
+    */
+   public static synchronized void rebindComp(Context jbossContext) throws NamingException
+   {
+      if (initialized)
+         return;
+
+      initialized = true;
+      RefAddr refAddr = new StringRefAddr("nns", "ENC");
+      Reference envRef = new Reference("javax.naming.Context", refAddr, ENCFactory.class.getName(), null);
+      Context ctx = (Context)jbossContext.lookup("java:");
+      ctx.rebind("comp", envRef);
+   }
+
+   @Override
+   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
+   {
+      if (getCurrentId() != null)
+      {
+         return super.getObjectInstance(obj, name, nameCtx, environment);
+      }
+      return apache.getInitialContext(environment).lookup("java:comp");
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/ENCFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/KernelInitializingContextFactory.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/KernelInitializingContextFactory.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/KernelInitializingContextFactory.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,50 +1,50 @@
-/*
- * 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.embedded.tomcat.jndi;
-
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class KernelInitializingContextFactory extends TomcatBridgeContextFactory
-{
-   /**
-    * Get a new (writable) initial context.
-    */
-   @Override
-   public Context getInitialContext(Hashtable environment) throws NamingException
-   {
-      System.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.embedded.tomcat.jndi");
-      org.jboss.embedded.jndi.KernelInitializingContextFactory.bootstrapEmbeddedKernel(environment);
-      Context jbossContext = super.getInitialContext(environment);
-      // reinitialize java:comp so that we don't have to have two copies of embedded configuration
-      ENCFactory.rebindComp(jbossContext);
-      
-      return jbossContext;
-   }
-}
+/*
+ * 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.embedded.tomcat.jndi;
+
+import java.util.Hashtable;
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class KernelInitializingContextFactory extends TomcatBridgeContextFactory
+{
+   /**
+    * Get a new (writable) initial context.
+    */
+   @Override
+   public Context getInitialContext(Hashtable environment) throws NamingException
+   {
+      System.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.embedded.tomcat.jndi");
+      org.jboss.embedded.jndi.KernelInitializingContextFactory.bootstrapEmbeddedKernel(environment);
+      Context jbossContext = super.getInitialContext(environment);
+      // reinitialize java:comp so that we don't have to have two copies of embedded configuration
+      ENCFactory.rebindComp(jbossContext);
+      
+      return jbossContext;
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/KernelInitializingContextFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/TomcatBridgeContextFactory.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/TomcatBridgeContextFactory.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/TomcatBridgeContextFactory.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,52 +1,52 @@
-/*
- * 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.embedded.tomcat.jndi;
-
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.apache.naming.java.javaURLContextFactory;
-import org.jboss.embedded.jndi.BridgeContext;
-import org.jboss.embedded.jndi.DelegatingContextFactory;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class TomcatBridgeContextFactory extends DelegatingContextFactory
-{
-   private javaURLContextFactory apache = new javaURLContextFactory();
-
-   /**
-    * Get a new (writable) initial context.
-    */
-   @Override
-   public Context getInitialContext(Hashtable environment) throws NamingException
-   {
-      Context jbossContext = super.getInitialContext(environment);
-      Context apacheContext = apache.getInitialContext(environment);
-      return BridgeContext.createBridge(jbossContext, apacheContext);
-   }
-}
+/*
+ * 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.embedded.tomcat.jndi;
+
+import java.util.Hashtable;
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.apache.naming.java.javaURLContextFactory;
+import org.jboss.embedded.jndi.BridgeContext;
+import org.jboss.embedded.jndi.DelegatingContextFactory;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class TomcatBridgeContextFactory extends DelegatingContextFactory
+{
+   private javaURLContextFactory apache = new javaURLContextFactory();
+
+   /**
+    * Get a new (writable) initial context.
+    */
+   @Override
+   public Context getInitialContext(Hashtable environment) throws NamingException
+   {
+      Context jbossContext = super.getInitialContext(environment);
+      Context apacheContext = apache.getInitialContext(environment);
+      return BridgeContext.createBridge(jbossContext, apacheContext);
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/TomcatBridgeContextFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/java/javaURLContextFactory.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/java/javaURLContextFactory.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/java/javaURLContextFactory.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,49 +1,49 @@
-/*
- * 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.embedded.tomcat.jndi.java;
-
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.spi.ObjectFactory;
-
-import org.jboss.embedded.jndi.BridgeContext;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class javaURLContextFactory implements ObjectFactory
-{
-   private org.jboss.naming.java.javaURLContextFactory jboss = new org.jboss.naming.java.javaURLContextFactory();
-   private org.apache.naming.java.javaURLContextFactory apache = new org.apache.naming.java.javaURLContextFactory();
-
-   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
-   {
-      Context jbossContext = (Context)jboss.getObjectInstance(obj, name, nameCtx, environment);
-      Context apacheContext = (Context)apache.getObjectInstance(obj, name, nameCtx, environment);
-      return BridgeContext.createBridge(jbossContext, apacheContext);
-   }
-}
-
+/*
+ * 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.embedded.tomcat.jndi.java;
+
+import java.util.Hashtable;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.spi.ObjectFactory;
+
+import org.jboss.embedded.jndi.BridgeContext;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class javaURLContextFactory implements ObjectFactory
+{
+   private org.jboss.naming.java.javaURLContextFactory jboss = new org.jboss.naming.java.javaURLContextFactory();
+   private org.apache.naming.java.javaURLContextFactory apache = new org.apache.naming.java.javaURLContextFactory();
+
+   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
+   {
+      Context jbossContext = (Context)jboss.getObjectInstance(obj, name, nameCtx, environment);
+      Context apacheContext = (Context)apache.getObjectInstance(obj, name, nameCtx, environment);
+      return BridgeContext.createBridge(jbossContext, apacheContext);
+   }
+}
+


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/jndi/java/javaURLContextFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecurityAssociationValve.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecurityAssociationValve.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecurityAssociationValve.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,92 +1,92 @@
-/*
- * 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.embedded.tomcat.security;
-
-import java.io.IOException;
-import java.security.Principal;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpSession;
-
-import org.apache.catalina.Container;
-import org.apache.catalina.Manager;
-import org.apache.catalina.Session;
-import org.apache.catalina.Wrapper;
-import org.apache.catalina.connector.Request;
-import org.apache.catalina.connector.Response;
-import org.apache.catalina.valves.ValveBase;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class SecurityAssociationValve extends ValveBase
-{
-   public SecurityAssociationValve()
-   {
-   }
-
-   public SecurityAssociationValve(Container container)
-   {
-      this.setContainer(container);
-   }
-
-   public void invoke(Request request, Response response) throws IOException, ServletException
-   {
-      Principal caller = request.getPrincipal();
-      System.out.println("******* caller principal: " + caller);
-
-      Principal userPrincipal = request.getUserPrincipal();
-      System.out.println("******* user principal: " + userPrincipal);
-
-      HttpSession hsession = request.getSession(false);
-      Session session = null;
-
-      // If there is a session, get the tomcat session for the principal
-      Manager manager = container.getManager();
-      if (manager != null && hsession != null)
-      {
-         try
-         {
-            session = manager.findSession(hsession.getId());
-         }
-         catch (IOException ignore)
-         {
-         }
-      }
-
-      if (session != null)
-      {
-         System.out.println("***** principal from session: " + session.getPrincipal());
-      }
-      else
-      {
-         System.out.println("Session was null");
-      }
-      Wrapper servlet = request.getWrapper();
-      System.out.println("RUNAS: " + servlet.getRunAs());
-      if (servlet.getRealm() == null)
-         System.out.println("Servlet realm was null");
-      getNext().invoke(request, response);
-   }
-}
+/*
+ * 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.embedded.tomcat.security;
+
+import java.io.IOException;
+import java.security.Principal;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpSession;
+
+import org.apache.catalina.Container;
+import org.apache.catalina.Manager;
+import org.apache.catalina.Session;
+import org.apache.catalina.Wrapper;
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+import org.apache.catalina.valves.ValveBase;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class SecurityAssociationValve extends ValveBase
+{
+   public SecurityAssociationValve()
+   {
+   }
+
+   public SecurityAssociationValve(Container container)
+   {
+      this.setContainer(container);
+   }
+
+   public void invoke(Request request, Response response) throws IOException, ServletException
+   {
+      Principal caller = request.getPrincipal();
+      System.out.println("******* caller principal: " + caller);
+
+      Principal userPrincipal = request.getUserPrincipal();
+      System.out.println("******* user principal: " + userPrincipal);
+
+      HttpSession hsession = request.getSession(false);
+      Session session = null;
+
+      // If there is a session, get the tomcat session for the principal
+      Manager manager = container.getManager();
+      if (manager != null && hsession != null)
+      {
+         try
+         {
+            session = manager.findSession(hsession.getId());
+         }
+         catch (IOException ignore)
+         {
+         }
+      }
+
+      if (session != null)
+      {
+         System.out.println("***** principal from session: " + session.getPrincipal());
+      }
+      else
+      {
+         System.out.println("Session was null");
+      }
+      Wrapper servlet = request.getWrapper();
+      System.out.println("RUNAS: " + servlet.getRunAs());
+      if (servlet.getRealm() == null)
+         System.out.println("Servlet realm was null");
+      getNext().invoke(request, response);
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecurityAssociationValve.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecuritySetupListener.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecuritySetupListener.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecuritySetupListener.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,55 +1,55 @@
-/*
- * 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.embedded.tomcat.security;
-
-import org.apache.catalina.Container;
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.Pipeline;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class SecuritySetupListener implements LifecycleListener
-{
-   public void lifecycleEvent(LifecycleEvent event)
-   {
-      if (event.getType().equals(Lifecycle.AFTER_START_EVENT))
-      {
-         if (!(event.getSource() instanceof Container))
-            return;
-
-         Container container = (Container)event.getSource();
-         Pipeline pipe = container.getPipeline();
-         if (pipe == null)
-         {
-            System.out.println("******** pipe was null");
-         }
-         else
-            container.getPipeline().addValve(new SecurityAssociationValve(container));
-      }
-   }
-}
+/*
+ * 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.embedded.tomcat.security;
+
+import org.apache.catalina.Container;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.catalina.Pipeline;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class SecuritySetupListener implements LifecycleListener
+{
+   public void lifecycleEvent(LifecycleEvent event)
+   {
+      if (event.getType().equals(Lifecycle.AFTER_START_EVENT))
+      {
+         if (!(event.getSource() instanceof Container))
+            return;
+
+         Container container = (Container)event.getSource();
+         Pipeline pipe = container.getPipeline();
+         if (pipe == null)
+         {
+            System.out.println("******** pipe was null");
+         }
+         else
+            container.getPipeline().addValve(new SecurityAssociationValve(container));
+      }
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/SecuritySetupListener.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/TomcatLoginModule.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/TomcatLoginModule.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/TomcatLoginModule.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,56 +1,56 @@
-/*
- * 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.embedded.tomcat.security;
-
-import java.security.Principal;
-import java.security.acl.Group;
-import javax.security.auth.login.LoginException;
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.security.auth.spi.AbstractServerLoginModule;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class TomcatLoginModule extends AbstractServerLoginModule
-{
-   static ThreadLocal<HttpServletRequest> request = new ThreadLocal<HttpServletRequest>();
-
-   @Override
-   public boolean login() throws LoginException
-   {
-      return super.login();    //To change body of overridden methods use File | Settings | File Templates.
-   }
-
-   protected Principal getIdentity()
-   {
-      return request.get().getUserPrincipal();
-   }
-
-   protected Group[] getRoleSets() throws LoginException
-   {
-      return new Group[0];
-   }
-}
+/*
+ * 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.embedded.tomcat.security;
+
+import java.security.Principal;
+import java.security.acl.Group;
+import javax.security.auth.login.LoginException;
+import javax.servlet.http.HttpServletRequest;
+
+import org.jboss.security.auth.spi.AbstractServerLoginModule;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class TomcatLoginModule extends AbstractServerLoginModule
+{
+   static ThreadLocal<HttpServletRequest> request = new ThreadLocal<HttpServletRequest>();
+
+   @Override
+   public boolean login() throws LoginException
+   {
+      return super.login();    //To change body of overridden methods use File | Settings | File Templates.
+   }
+
+   protected Principal getIdentity()
+   {
+      return request.get().getUserPrincipal();
+   }
+
+   protected Group[] getRoleSets() throws LoginException
+   {
+      return new Group[0];
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/tomcat/security/TomcatLoginModule.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/url/BridgeHandlerFactory.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/url/BridgeHandlerFactory.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/url/BridgeHandlerFactory.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,54 +1,54 @@
-/*
- * 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.embedded.url;
-
-import java.net.URLStreamHandler;
-import java.net.URLStreamHandlerFactory;
-import java.util.List;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class BridgeHandlerFactory implements URLStreamHandlerFactory
-{
-   private List<URLStreamHandlerFactory> list;
-
-   public BridgeHandlerFactory(List<URLStreamHandlerFactory> list)
-   {
-      this.list = list;
-   }
-
-   public URLStreamHandler createURLStreamHandler(String protocol)
-   {
-      URLStreamHandler result = null;
-      for (URLStreamHandlerFactory factory : list)
-      {
-         
-         result = factory.createURLStreamHandler(protocol);
-         if (result != null) return result;
-      }
-      return null;
-   }
-}
+/*
+ * 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.embedded.url;
+
+import java.net.URLStreamHandler;
+import java.net.URLStreamHandlerFactory;
+import java.util.List;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class BridgeHandlerFactory implements URLStreamHandlerFactory
+{
+   private List<URLStreamHandlerFactory> list;
+
+   public BridgeHandlerFactory(List<URLStreamHandlerFactory> list)
+   {
+      this.list = list;
+   }
+
+   public URLStreamHandler createURLStreamHandler(String protocol)
+   {
+      URLStreamHandler result = null;
+      for (URLStreamHandlerFactory factory : list)
+      {
+         
+         result = factory.createURLStreamHandler(protocol);
+         if (result != null) return result;
+      }
+      return null;
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/url/BridgeHandlerFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/url/HandlerFactoryHack.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/url/HandlerFactoryHack.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/url/HandlerFactoryHack.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,84 +1,84 @@
-/*
- * 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.embedded.url;
-
-import java.lang.reflect.Field;
-import java.net.URL;
-import java.net.URLStreamHandlerFactory;
-import java.util.List;
-
-/**
- * Tries to set URL.setURLStreamHandlerFactory() with the provided factory.
- * If it fails, it tries to reset handler by creating a BridgeHandlerFactory
- * and hacking the JDK to overcome URL.setURLStreamHandlerFactory()'s limitation
- * of only being able to be set up once.
- *
- * If there is already an existing handler factory then this factory will be added to the bridge list
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class HandlerFactoryHack
-{
-   private List<URLStreamHandlerFactory> factories;
-
-   public List<URLStreamHandlerFactory> getFactories()
-   {
-      return factories;
-   }
-
-   public void setFactories(List<URLStreamHandlerFactory> factories)
-   {
-      this.factories = factories;
-   }
-
-   public void start() throws Exception
-   {
-      hack();
-   }
-
-   protected void hack() throws Exception
-   {
-      BridgeHandlerFactory bridge = new BridgeHandlerFactory(factories);
-      try
-      {
-         URL.setURLStreamHandlerFactory(bridge);
-         return;
-      }
-      catch (Error ignored)
-      {
-         // already set
-      }
-      try
-      {
-         Field factoryField = URL.class.getDeclaredField("factory");
-         factoryField.setAccessible(true);
-         URLStreamHandlerFactory old = (URLStreamHandlerFactory)factoryField.get(null);
-         if (old != null) factories.add(0, old);
-         factoryField.set(null, bridge);
-      }
-      catch (Exception e)
-      {
-         throw e;
-      }
-   }
-}
+/*
+ * 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.embedded.url;
+
+import java.lang.reflect.Field;
+import java.net.URL;
+import java.net.URLStreamHandlerFactory;
+import java.util.List;
+
+/**
+ * Tries to set URL.setURLStreamHandlerFactory() with the provided factory.
+ * If it fails, it tries to reset handler by creating a BridgeHandlerFactory
+ * and hacking the JDK to overcome URL.setURLStreamHandlerFactory()'s limitation
+ * of only being able to be set up once.
+ *
+ * If there is already an existing handler factory then this factory will be added to the bridge list
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class HandlerFactoryHack
+{
+   private List<URLStreamHandlerFactory> factories;
+
+   public List<URLStreamHandlerFactory> getFactories()
+   {
+      return factories;
+   }
+
+   public void setFactories(List<URLStreamHandlerFactory> factories)
+   {
+      this.factories = factories;
+   }
+
+   public void start() throws Exception
+   {
+      hack();
+   }
+
+   protected void hack() throws Exception
+   {
+      BridgeHandlerFactory bridge = new BridgeHandlerFactory(factories);
+      try
+      {
+         URL.setURLStreamHandlerFactory(bridge);
+         return;
+      }
+      catch (Error ignored)
+      {
+         // already set
+      }
+      try
+      {
+         Field factoryField = URL.class.getDeclaredField("factory");
+         factoryField.setAccessible(true);
+         URLStreamHandlerFactory old = (URLStreamHandlerFactory)factoryField.get(null);
+         if (old != null) factories.add(0, old);
+         factoryField.set(null, bridge);
+      }
+      catch (Exception e)
+      {
+         throw e;
+      }
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/url/HandlerFactoryHack.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/url/JavaProtocolHandlerPkgs.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/url/JavaProtocolHandlerPkgs.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/url/JavaProtocolHandlerPkgs.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,76 +1,76 @@
-/*
- * 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.embedded.url;
-
-/**
- * Adds handler string to current System.getProperty("java.protocol.handler.pkgs")
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class JavaProtocolHandlerPkgs
-{
-   private String pkgs;
-
-   public String getPkgs()
-   {
-      return pkgs;
-   }
-
-   public void setPkgs(String pkgs)
-   {
-      this.pkgs = pkgs;
-   }
-
-   public void start()
-   {
-      setupHandlerPkgs(pkgs);
-   }
-
-   public static void setupHandlerPkgs(String pkgs)
-   {
-      setupHandlerPkgs(pkgs.split("|"));
-   }
-
-   public static void setupHandlerPkgs(String[] additionalPkgs)
-   {
-      String pkgs = System.getProperty("java.protocol.handler.pkgs");
-      if (pkgs == null || pkgs.trim().length() == 0)
-      {
-         pkgs = "";
-         for (int i = 0; i < additionalPkgs.length; i++)
-         {
-            pkgs += additionalPkgs[i];
-            if (i + 1 < additionalPkgs.length) pkgs += "|";
-         }
-         System.setProperty("java.protocol.handler.pkgs", pkgs);
-      }
-      else
-      {
-         for (String pkg : additionalPkgs)
-         {
-            pkgs += "|" + pkg;
-         }
-         System.setProperty("java.protocol.handler.pkgs", pkgs);
-      }
-   }
-}
+/*
+ * 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.embedded.url;
+
+/**
+ * Adds handler string to current System.getProperty("java.protocol.handler.pkgs")
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class JavaProtocolHandlerPkgs
+{
+   private String pkgs;
+
+   public String getPkgs()
+   {
+      return pkgs;
+   }
+
+   public void setPkgs(String pkgs)
+   {
+      this.pkgs = pkgs;
+   }
+
+   public void start()
+   {
+      setupHandlerPkgs(pkgs);
+   }
+
+   public static void setupHandlerPkgs(String pkgs)
+   {
+      setupHandlerPkgs(pkgs.split("|"));
+   }
+
+   public static void setupHandlerPkgs(String[] additionalPkgs)
+   {
+      String pkgs = System.getProperty("java.protocol.handler.pkgs");
+      if (pkgs == null || pkgs.trim().length() == 0)
+      {
+         pkgs = "";
+         for (int i = 0; i < additionalPkgs.length; i++)
+         {
+            pkgs += additionalPkgs[i];
+            if (i + 1 < additionalPkgs.length) pkgs += "|";
+         }
+         System.setProperty("java.protocol.handler.pkgs", pkgs);
+      }
+      else
+      {
+         for (String pkg : additionalPkgs)
+         {
+            pkgs += "|" + pkg;
+         }
+         System.setProperty("java.protocol.handler.pkgs", pkgs);
+      }
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/url/JavaProtocolHandlerPkgs.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperties.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperties.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperties.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,54 +1,54 @@
-/*
- * 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.embedded.util;
-
-import java.util.Map;
-
-/**
- * little class to set system properties
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class SystemProperties
-{
-   private Map<String, String> properties;
-
-   public Map<String, String> getProperties()
-   {
-      return properties;
-   }
-
-   public void setProperties(Map<String, String> properties)
-   {
-      this.properties = properties;
-   }
-
-   public void start()
-   {
-      for (String key : properties.keySet())
-      {
-         String value = properties.get(key);
-         System.setProperty(key, value);
-      }
-   }
-}
+/*
+ * 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.embedded.util;
+
+import java.util.Map;
+
+/**
+ * little class to set system properties
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class SystemProperties
+{
+   private Map<String, String> properties;
+
+   public Map<String, String> getProperties()
+   {
+      return properties;
+   }
+
+   public void setProperties(Map<String, String> properties)
+   {
+      this.properties = properties;
+   }
+
+   public void start()
+   {
+      for (String key : properties.keySet())
+      {
+         String value = properties.get(key);
+         System.setProperty(key, value);
+      }
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperties.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperty.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperty.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperty.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,60 +1,60 @@
-/*
- * 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.embedded.util;
-
-/**
- * little class to set system properties
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class SystemProperty
-{
-   private String name;
-   private String value;
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public String getValue()
-   {
-      return value;
-   }
-
-   public void setValue(String value)
-   {
-      this.value = value;
-   }
-
-   public void start()
-   {
-      System.setProperty(name, value);
-      System.out.println("System.setProperty("+name+","+value);
-   }
-}
+/*
+ * 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.embedded.util;
+
+/**
+ * little class to set system properties
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class SystemProperty
+{
+   private String name;
+   private String value;
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   public String getValue()
+   {
+      return value;
+   }
+
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+
+   public void start()
+   {
+      System.setProperty(name, value);
+      System.out.println("System.setProperty("+name+","+value);
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/embedded/util/SystemProperty.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/naming/JBossRemotingContextFactory.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/naming/JBossRemotingContextFactory.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/naming/JBossRemotingContextFactory.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,184 +1,184 @@
-/*
- * 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;
-
-import java.security.Principal;
-import java.util.Hashtable;
-
-import javax.naming.AuthenticationException;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.spi.InitialContextFactory;
-import javax.naming.spi.ObjectFactory;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
-import org.jboss.aspects.remoting.IsLocalInterceptor;
-import org.jboss.aspects.remoting.Remoting;
-import org.jboss.aspects.security.SecurityClientInterceptor;
-import org.jboss.security.SimplePrincipal;
-import org.jboss.security.auth.callback.UsernamePasswordHandler;
-import org.jnp.interfaces.Naming;
-import org.jnp.interfaces.NamingContext;
-
-/**
- * Creating a JNDI connection using JBoss Remoting.
- *
- * If Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS are set, 
- * this InitialContextFactory implementation combines the
- * authentication phase with the InitialContext creation. During the
- * getInitialContext callback from the JNDI naming, layer security context
- * identity is populated with the username obtained from the
- * Context.SECURITY_PRINCIPAL env property and the credentials from the
- * Context.SECURITY_CREDENTIALS env property. There is no actual authentication
- * of this information. It is merely made available to the jboss transport
- * layer for incorporation into subsequent invocations. Authentication and
- * authorization will occur on the server.
- *
- * If Context.SECURITY_PROTOCOL is provided as well as the principal and credentials,
- * then a JAAS login will be performed instead using the security domain provided with the
- * SECURITY_PROTOCOL variable.
- *
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @author <a href="mailto:scott at jboss.org">Scott Stark</a>
- * @author adrian at jboss.org
- * @version $Revision: 37459 $
- */
-public class JBossRemotingContextFactory implements InitialContextFactory, ObjectFactory
-{
-   static void associateSecurityInformation(Object principal, Object credentials)
-   {
-      Principal securityPrincipal;
-      // See if the principal is a Principal or String
-      if( principal instanceof Principal )
-      {
-         securityPrincipal = (Principal) principal;
-      }
-      else
-      {
-         // Simply convert this to a name using toString
-         String username = principal.toString();
-         securityPrincipal = new SimplePrincipal(username);
-      }
-      // Associate this security context
-      SecurityAssociationActions.setPrincipalInfo(securityPrincipal, credentials);
-   }
-
-   static void login(Object principal, Object credentials, Object prop) throws AuthenticationException
-   {
-      String protocol = prop.toString();
-      try
-      {
-         // Get the principal username
-         String username;
-         if( principal instanceof Principal )
-         {
-            Principal p = (Principal) principal;
-            username = p.getName();
-         }
-         else
-         {
-            username = principal.toString();
-         }
-         UsernamePasswordHandler handler = new UsernamePasswordHandler(username,
-            credentials);
-         // Do the JAAS login
-         LoginContext lc = new LoginContext(protocol, handler);
-         lc.login();
-      }
-      catch(LoginException e)
-      {
-         AuthenticationException ex = new AuthenticationException("Failed to login using protocol="+protocol);
-         ex.setRootCause(e);
-         throw ex;
-      }
-
-   }
-
-   // InitialContextFactory implementation
-   public Context getInitialContext(Hashtable env) throws NamingException
-   {
-      Class[] interfaces = {Naming.class};
-      Interceptor[] interceptors;
-      Naming naming;
-
-      // Get the login principal and credentials from the JNDI env
-      Object credentials = env.get(Context.SECURITY_CREDENTIALS);
-      Object principal = env.get(Context.SECURITY_PRINCIPAL);
-      Object protocol = env.get(Context.SECURITY_PROTOCOL);
-
-      if (principal != null && credentials != null)
-      {
-         if (protocol != null)
-         {
-            login(principal, credentials, protocol);
-         }
-         else
-         {
-            associateSecurityInformation(principal, credentials);
-         }
-         Interceptor[] tmp = {IsLocalInterceptor.singleton, SecurityClientInterceptor.singleton, InvokeRemoteInterceptor.singleton};
-         interceptors = tmp;
-      }
-      else
-      {
-         Interceptor[] tmp = {IsLocalInterceptor.singleton, InvokeRemoteInterceptor.singleton};
-         interceptors = tmp;
-      }
-
-      Naming local = NamingContext.getLocal();
-      if (local != null) return new NamingContext(env, null, local);
-
-      String providerUrl = (String) env.get(Context.PROVIDER_URL);
-      if (providerUrl == null)
-      {
-         throw new RuntimeException("PROVIDER_URL not provided in jndi.properties.  Automatic discovery not implemented yet.");
-      }
-      try
-      {
-         naming = (Naming) Remoting.createPojiProxy("JNDI", interfaces, providerUrl, interceptors);
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException("Unable to create Naming proxy", e);
-      }
-
-      return new NamingContext(env, null, naming);
-   }
-
-   // ObjectFactory implementation ----------------------------------
-   public Object getObjectInstance(Object obj,
-                                   Name name,
-                                   Context nameCtx,
-                                   Hashtable environment)
-           throws Exception
-   {
-      Context ctx = getInitialContext(environment);
-      Reference ref = (Reference) obj;
-      return ctx.lookup((String) ref.get("URL").getContent());
-   }
-}
+/*
+ * 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;
+
+import java.security.Principal;
+import java.util.Hashtable;
+
+import javax.naming.AuthenticationException;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.naming.spi.InitialContextFactory;
+import javax.naming.spi.ObjectFactory;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
+import org.jboss.aspects.remoting.IsLocalInterceptor;
+import org.jboss.aspects.remoting.Remoting;
+import org.jboss.aspects.security.SecurityClientInterceptor;
+import org.jboss.security.SimplePrincipal;
+import org.jboss.security.auth.callback.UsernamePasswordHandler;
+import org.jnp.interfaces.Naming;
+import org.jnp.interfaces.NamingContext;
+
+/**
+ * Creating a JNDI connection using JBoss Remoting.
+ *
+ * If Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS are set, 
+ * this InitialContextFactory implementation combines the
+ * authentication phase with the InitialContext creation. During the
+ * getInitialContext callback from the JNDI naming, layer security context
+ * identity is populated with the username obtained from the
+ * Context.SECURITY_PRINCIPAL env property and the credentials from the
+ * Context.SECURITY_CREDENTIALS env property. There is no actual authentication
+ * of this information. It is merely made available to the jboss transport
+ * layer for incorporation into subsequent invocations. Authentication and
+ * authorization will occur on the server.
+ *
+ * If Context.SECURITY_PROTOCOL is provided as well as the principal and credentials,
+ * then a JAAS login will be performed instead using the security domain provided with the
+ * SECURITY_PROTOCOL variable.
+ *
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @author <a href="mailto:scott at jboss.org">Scott Stark</a>
+ * @author adrian at jboss.org
+ * @version $Revision: 37459 $
+ */
+public class JBossRemotingContextFactory implements InitialContextFactory, ObjectFactory
+{
+   static void associateSecurityInformation(Object principal, Object credentials)
+   {
+      Principal securityPrincipal;
+      // See if the principal is a Principal or String
+      if( principal instanceof Principal )
+      {
+         securityPrincipal = (Principal) principal;
+      }
+      else
+      {
+         // Simply convert this to a name using toString
+         String username = principal.toString();
+         securityPrincipal = new SimplePrincipal(username);
+      }
+      // Associate this security context
+      SecurityAssociationActions.setPrincipalInfo(securityPrincipal, credentials);
+   }
+
+   static void login(Object principal, Object credentials, Object prop) throws AuthenticationException
+   {
+      String protocol = prop.toString();
+      try
+      {
+         // Get the principal username
+         String username;
+         if( principal instanceof Principal )
+         {
+            Principal p = (Principal) principal;
+            username = p.getName();
+         }
+         else
+         {
+            username = principal.toString();
+         }
+         UsernamePasswordHandler handler = new UsernamePasswordHandler(username,
+            credentials);
+         // Do the JAAS login
+         LoginContext lc = new LoginContext(protocol, handler);
+         lc.login();
+      }
+      catch(LoginException e)
+      {
+         AuthenticationException ex = new AuthenticationException("Failed to login using protocol="+protocol);
+         ex.setRootCause(e);
+         throw ex;
+      }
+
+   }
+
+   // InitialContextFactory implementation
+   public Context getInitialContext(Hashtable env) throws NamingException
+   {
+      Class[] interfaces = {Naming.class};
+      Interceptor[] interceptors;
+      Naming naming;
+
+      // Get the login principal and credentials from the JNDI env
+      Object credentials = env.get(Context.SECURITY_CREDENTIALS);
+      Object principal = env.get(Context.SECURITY_PRINCIPAL);
+      Object protocol = env.get(Context.SECURITY_PROTOCOL);
+
+      if (principal != null && credentials != null)
+      {
+         if (protocol != null)
+         {
+            login(principal, credentials, protocol);
+         }
+         else
+         {
+            associateSecurityInformation(principal, credentials);
+         }
+         Interceptor[] tmp = {IsLocalInterceptor.singleton, SecurityClientInterceptor.singleton, InvokeRemoteInterceptor.singleton};
+         interceptors = tmp;
+      }
+      else
+      {
+         Interceptor[] tmp = {IsLocalInterceptor.singleton, InvokeRemoteInterceptor.singleton};
+         interceptors = tmp;
+      }
+
+      Naming local = NamingContext.getLocal();
+      if (local != null) return new NamingContext(env, null, local);
+
+      String providerUrl = (String) env.get(Context.PROVIDER_URL);
+      if (providerUrl == null)
+      {
+         throw new RuntimeException("PROVIDER_URL not provided in jndi.properties.  Automatic discovery not implemented yet.");
+      }
+      try
+      {
+         naming = (Naming) Remoting.createPojiProxy("JNDI", interfaces, providerUrl, interceptors);
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException("Unable to create Naming proxy", e);
+      }
+
+      return new NamingContext(env, null, naming);
+   }
+
+   // ObjectFactory implementation ----------------------------------
+   public Object getObjectInstance(Object obj,
+                                   Name name,
+                                   Context nameCtx,
+                                   Hashtable environment)
+           throws Exception
+   {
+      Context ctx = getInitialContext(environment);
+      Reference ref = (Reference) obj;
+      return ctx.lookup((String) ref.get("URL").getContent());
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/naming/JBossRemotingContextFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/java/org/jboss/naming/SecurityAssociationActions.java
===================================================================
--- trunk/embedded/src/main/java/org/jboss/naming/SecurityAssociationActions.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/java/org/jboss/naming/SecurityAssociationActions.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,62 +1,62 @@
-/*
- * 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;
-
-import java.security.AccessController;
-import java.security.Principal;
-import java.security.PrivilegedAction;
-
-import org.jboss.security.SecurityAssociation;
-
-/** A PrivilegedAction implementation for setting the SecurityAssociation
- * principal and credential
- *
- * @author Scott.Stark at jboss.org
- * @version $Revison:$
- */
-class SecurityAssociationActions
-{
-   private static class SetPrincipalInfoAction implements PrivilegedAction
-   {
-      Principal principal;
-      Object credential;
-      SetPrincipalInfoAction(Principal principal, Object credential)
-      {
-         this.principal = principal;
-         this.credential = credential;
-      }
-      public Object run()
-      {
-         SecurityAssociation.setCredential(credential);
-         credential = null;
-         SecurityAssociation.setPrincipal(principal);
-         principal = null;
-         return null;
-      }
-   }
-
-   static void setPrincipalInfo(Principal principal, Object credential)
-   {
-      SecurityAssociationActions.SetPrincipalInfoAction action = new SecurityAssociationActions.SetPrincipalInfoAction(principal, credential);
-      AccessController.doPrivileged(action);
-   }
-}
+/*
+ * 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;
+
+import java.security.AccessController;
+import java.security.Principal;
+import java.security.PrivilegedAction;
+
+import org.jboss.security.SecurityAssociation;
+
+/** A PrivilegedAction implementation for setting the SecurityAssociation
+ * principal and credential
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revison:$
+ */
+class SecurityAssociationActions
+{
+   private static class SetPrincipalInfoAction implements PrivilegedAction
+   {
+      Principal principal;
+      Object credential;
+      SetPrincipalInfoAction(Principal principal, Object credential)
+      {
+         this.principal = principal;
+         this.credential = credential;
+      }
+      public Object run()
+      {
+         SecurityAssociation.setCredential(credential);
+         credential = null;
+         SecurityAssociation.setPrincipal(principal);
+         principal = null;
+         return null;
+      }
+   }
+
+   static void setPrincipalInfo(Principal principal, Object credential)
+   {
+      SecurityAssociationActions.SetPrincipalInfoAction action = new SecurityAssociationActions.SetPrincipalInfoAction(principal, credential);
+      AccessController.doPrivileged(action);
+   }
+}


Property changes on: trunk/embedded/src/main/java/org/jboss/naming/SecurityAssociationActions.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/META-INF/persistence.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/resources/javase/conf/bootstrap-beans.xml
===================================================================
--- trunk/embedded/src/main/resources/javase/conf/bootstrap-beans.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/resources/javase/conf/bootstrap-beans.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,228 +1,228 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-   The bootstrap of the server
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <bean name="SystemProperties" class="org.jboss.embedded.util.SystemProperties">
-      <property name="properties">
-         <map keyClass="java.lang.String" valueClass="java.lang.String">
-            <entry>
-               <key>jboss.bind.address</key>
-               <value>0.0.0.0</value>
-            </entry>
-            <entry>
-               <key>com.arjuna.ats.arjuna.common.propertiesFile</key>
-               <value>${jboss.home.dir}/conf/jbossjta-properties.xml</value>
-            </entry>
-            <entry>
-               <key>com.arjuna.ats.arjuna.objectstore.objectStoreDir</key>
-               <value>${jboss.server.data.dir}/ObjectStore</value>
-            </entry>
-         </map>
-      </property>
-   </bean>
-
-   <!-- The legacy JMX kernel -->
-   <bean name="JMXKernel" class="org.jboss.embedded.adapters.JMXKernel">
-      <property name="kernel">
-         <inject bean="jboss.kernel:service=Kernel"/>
-      </property>
-      <property name="serverConfig">
-         <inject bean="ServerConfig"/>
-      </property>
-   </bean>
-
-   <!-- The MainDeployer -->
-   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
-      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
-      <property name="deployers"><inject bean="Deployers"/></property>
-   </bean>
-
-   <!-- The holder for deployers that determine structure -->
-   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
-      <property name="structureBuilder">
-         <!-- The consolidator of the structure information -->
-         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
-      </property>
-      <!-- Accept any implementor of structure deployer -->
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-      
-   <!-- The holder for deployers that do real deployment -->
-   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
-      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
-      <!-- Accept any implementor of deployer -->
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-
-   <!-- A declared structure descriptor deployer -->
-   <bean name="DeclaredStructure" class="org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure"/>
-
-    <!-- JAR Structure -->
-    <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
-       <!-- Unless specified the default list of suffixes is .zip, .ear, .jar, ,.rar, .war, .sar, .har, .aop -->
-       <constructor>
-          <parameter>
-             <set elementClass="java.lang.String">
-                <value>.zip</value>
-                <value>.ear</value>
-                <value>.jar</value>
-                <value>.rar</value>
-                <value>.war</value>
-                <value>.sar</value>
-                <value>.har</value>
-                <value>.aop</value>
-                <value>.deployer</value>
-                <value>.beans</value>
-             </set>
-          </parameter>
-       </constructor>
-       <property name="candidateStructureVisitorFactory">
-          <!-- Any file that is not an ordinary directory is a candidate -->
-          <bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
-             <!-- A filter to exclude some obvious non-subdeployments -->
-             <property name="filter">
-                <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
-                   <constructor><parameter>
-                      <list elementClass="java.lang.String">
-                         <!-- Exclude class files as subdeployments -->
-                         <value>.class</value>
-                      </list>
-                   </parameter></constructor>
-                </bean>
-             </property>
-          </bean>
-       </property>
-    </bean>
-
-    <!-- File Structure -->
-    <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
-       <!-- Unless specified the default list of suffixes is -service.xml, -beans.xml, -ds.xml, -aop.xml -->
-       <constructor>
-          <parameter>
-             <set elementClass="java.lang.String">
-                <value>-service.xml</value>
-                <value>-beans.xml</value>
-                <value>-ds.xml</value>
-                <value>-aop.xml</value>
-             </set>
-          </parameter>
-       </constructor>
-    </bean>
-
-   <!-- POJO Deployment -->
-   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer"/>
-   <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer"/>
-   <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
-      <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
-   </bean>
-
-   <!-- JMX Deployment -->
-   <bean name="SARDeployer" class="org.jboss.system.deployers.SARDeployer"/>
-   <bean name="ServiceClassLoaderDeployer" class="org.jboss.embedded.ClassLoaderDeployer"/>
-   <bean name="ServiceDeploymentDeployer" class="org.jboss.system.deployers.ServiceDeploymentDeployer"/>
-   <bean name="ServiceDeployer" class="org.jboss.system.deployers.ServiceDeployer">
-       <constructor><parameter><inject bean="JMXKernel" property="serviceController"/></parameter></constructor>
-   </bean>
-
-   <!-- A filter for excluding files from the scanner -->
-   <bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
-      <!-- Files starting with theses strings are ignored -->
-      <property name="prefixes">#,%,\,,.,_$</property>
-      <!-- Files ending with theses strings are ignored -->
-      <property name="suffixes">#,$,%,~,\,v,.BAK,.bak,.old,.orig,.tmp,.rej,.sh</property>
-      <!-- Files matching with theses strings are ignored -->
-      <property name="matches">.make.state,.nse_depinfo,CVS,CVS.admin,RCS,RCSLOG,SCCS,TAGS,core,tags</property>
-   </bean>
-
-   <!--
-        JNDI Initialization of basic beans (NO REMOTING)
-     -->
-   <bean name="Naming" class="org.jnp.server.SingletonNamingServer"/>
-   <bean name="java:comp" class="org.jboss.naming.JavaCompInitializer"/>
-
-   <!-- register Naming bean with dispatcher just in case we want to have a remote JNDI connection -->
-   <bean name="JndiRegistration" class="org.jboss.aspects.remoting.DispatcherRegistration">
-      <property name="oid">JNDI</property>
-      <property name="target"><inject bean="Naming"/></property>
-   </bean>
-
-   <!--
-        Bootstrap old JMX-based core services
-        setup deployers
-        setup deploy/ directory
-     -->
-   <bean name="ResourcesToDeploy" class="org.jboss.embedded.DeploymentScanner">
-      <property name="filter">
-         <inject bean="DeploymentFilter"/>
-      </property>
-      <property name="mainDeployer">
-         <inject bean="MainDeployer"/>
-      </property>
-      <property name="kernel">
-         <inject bean="jboss.kernel:service=Kernel"/>
-      </property>
-      <property name="resources">
-         <list elementClass="java.lang.String">
-            <value>${jboss.embedded.bootstrap.resource.path}conf/jboss-service.xml</value>
-         </list>
-      </property>
-   </bean>
-
-   <bean name="UserTransaction" class="org.jboss.embedded.adapters.LocalOnlyUserTransaction"/>
-
-   <bean name="UserTransactionBinding" class="org.jboss.naming.JndiBinder">
-      <property name="target">
-         <inject bean="UserTransaction"/>
-      </property>
-      <property name="bindTo">UserTransaction</property>
-      <property name="serializable">false</property>
-   </bean>
-
-   <!-- FIXME EMB-2 -->
-   <bean name="UserTransactionBinding2" class="org.jboss.naming.JndiBinder">
-      <property name="target">
-         <inject bean="UserTransaction"/>
-      </property>
-      <property name="bindTo">java:comp/UserTransaction</property>
-      <property name="serializable">false</property>
-   </bean>
-
-
-   <bean name="ResourcesToDeploy2" class="org.jboss.embedded.DeploymentScanner">
-      <property name="filter">
-         <inject bean="DeploymentFilter"/>
-      </property>
-      <property name="mainDeployer">
-         <inject bean="MainDeployer"/>
-      </property>
-      <property name="kernel">
-         <inject bean="jboss.kernel:service=Kernel"/>
-      </property>
-      <property name="directoriesByResource">
-         <list elementClass="java.lang.String">
-            <value>${jboss.embedded.bootstrap.resource.path}conf/jboss-service.xml/../deployers</value>
-         </list>
-      </property>
-   </bean>
-   <bean name="ResourcesToDeploy3" class="org.jboss.embedded.DeploymentScanner">
-      <property name="filter">
-         <inject bean="DeploymentFilter"/>
-      </property>
-      <property name="mainDeployer">
-         <inject bean="MainDeployer"/>
-      </property>
-      <property name="kernel">
-         <inject bean="jboss.kernel:service=Kernel"/>
-      </property>
-      <property name="directoriesByResource">
-         <list elementClass="java.lang.String">
-            <value>${jboss.embedded.bootstrap.resource.path}conf/jboss-service.xml/../deploy</value>
-         </list>
-      </property>
-   </bean>
-</deployment>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   The bootstrap of the server
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="SystemProperties" class="org.jboss.embedded.util.SystemProperties">
+      <property name="properties">
+         <map keyClass="java.lang.String" valueClass="java.lang.String">
+            <entry>
+               <key>jboss.bind.address</key>
+               <value>0.0.0.0</value>
+            </entry>
+            <entry>
+               <key>com.arjuna.ats.arjuna.common.propertiesFile</key>
+               <value>${jboss.home.dir}/conf/jbossjta-properties.xml</value>
+            </entry>
+            <entry>
+               <key>com.arjuna.ats.arjuna.objectstore.objectStoreDir</key>
+               <value>${jboss.server.data.dir}/ObjectStore</value>
+            </entry>
+         </map>
+      </property>
+   </bean>
+
+   <!-- The legacy JMX kernel -->
+   <bean name="JMXKernel" class="org.jboss.embedded.adapters.JMXKernel">
+      <property name="kernel">
+         <inject bean="jboss.kernel:service=Kernel"/>
+      </property>
+      <property name="serverConfig">
+         <inject bean="ServerConfig"/>
+      </property>
+   </bean>
+
+   <!-- The MainDeployer -->
+   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+      <property name="deployers"><inject bean="Deployers"/></property>
+   </bean>
+
+   <!-- The holder for deployers that determine structure -->
+   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+      <property name="structureBuilder">
+         <!-- The consolidator of the structure information -->
+         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+      </property>
+      <!-- Accept any implementor of structure deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+      
+   <!-- The holder for deployers that do real deployment -->
+   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+      <!-- Accept any implementor of deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- A declared structure descriptor deployer -->
+   <bean name="DeclaredStructure" class="org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure"/>
+
+    <!-- JAR Structure -->
+    <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
+       <!-- Unless specified the default list of suffixes is .zip, .ear, .jar, ,.rar, .war, .sar, .har, .aop -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>.zip</value>
+                <value>.ear</value>
+                <value>.jar</value>
+                <value>.rar</value>
+                <value>.war</value>
+                <value>.sar</value>
+                <value>.har</value>
+                <value>.aop</value>
+                <value>.deployer</value>
+                <value>.beans</value>
+             </set>
+          </parameter>
+       </constructor>
+       <property name="candidateStructureVisitorFactory">
+          <!-- Any file that is not an ordinary directory is a candidate -->
+          <bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
+             <!-- A filter to exclude some obvious non-subdeployments -->
+             <property name="filter">
+                <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
+                   <constructor><parameter>
+                      <list elementClass="java.lang.String">
+                         <!-- Exclude class files as subdeployments -->
+                         <value>.class</value>
+                      </list>
+                   </parameter></constructor>
+                </bean>
+             </property>
+          </bean>
+       </property>
+    </bean>
+
+    <!-- File Structure -->
+    <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
+       <!-- Unless specified the default list of suffixes is -service.xml, -beans.xml, -ds.xml, -aop.xml -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>-service.xml</value>
+                <value>-beans.xml</value>
+                <value>-ds.xml</value>
+                <value>-aop.xml</value>
+             </set>
+          </parameter>
+       </constructor>
+    </bean>
+
+   <!-- POJO Deployment -->
+   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer"/>
+   <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer"/>
+   <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+      <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+   </bean>
+
+   <!-- JMX Deployment -->
+   <bean name="SARDeployer" class="org.jboss.system.deployers.SARDeployer"/>
+   <bean name="ServiceClassLoaderDeployer" class="org.jboss.embedded.ClassLoaderDeployer"/>
+   <bean name="ServiceDeploymentDeployer" class="org.jboss.system.deployers.ServiceDeploymentDeployer"/>
+   <bean name="ServiceDeployer" class="org.jboss.system.deployers.ServiceDeployer">
+       <constructor><parameter><inject bean="JMXKernel" property="serviceController"/></parameter></constructor>
+   </bean>
+
+   <!-- A filter for excluding files from the scanner -->
+   <bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
+      <!-- Files starting with theses strings are ignored -->
+      <property name="prefixes">#,%,\,,.,_$</property>
+      <!-- Files ending with theses strings are ignored -->
+      <property name="suffixes">#,$,%,~,\,v,.BAK,.bak,.old,.orig,.tmp,.rej,.sh</property>
+      <!-- Files matching with theses strings are ignored -->
+      <property name="matches">.make.state,.nse_depinfo,CVS,CVS.admin,RCS,RCSLOG,SCCS,TAGS,core,tags</property>
+   </bean>
+
+   <!--
+        JNDI Initialization of basic beans (NO REMOTING)
+     -->
+   <bean name="Naming" class="org.jnp.server.SingletonNamingServer"/>
+   <bean name="java:comp" class="org.jboss.naming.JavaCompInitializer"/>
+
+   <!-- register Naming bean with dispatcher just in case we want to have a remote JNDI connection -->
+   <bean name="JndiRegistration" class="org.jboss.aspects.remoting.DispatcherRegistration">
+      <property name="oid">JNDI</property>
+      <property name="target"><inject bean="Naming"/></property>
+   </bean>
+
+   <!--
+        Bootstrap old JMX-based core services
+        setup deployers
+        setup deploy/ directory
+     -->
+   <bean name="ResourcesToDeploy" class="org.jboss.embedded.DeploymentScanner">
+      <property name="filter">
+         <inject bean="DeploymentFilter"/>
+      </property>
+      <property name="mainDeployer">
+         <inject bean="MainDeployer"/>
+      </property>
+      <property name="kernel">
+         <inject bean="jboss.kernel:service=Kernel"/>
+      </property>
+      <property name="resources">
+         <list elementClass="java.lang.String">
+            <value>${jboss.embedded.bootstrap.resource.path}conf/jboss-service.xml</value>
+         </list>
+      </property>
+   </bean>
+
+   <bean name="UserTransaction" class="org.jboss.embedded.adapters.LocalOnlyUserTransaction"/>
+
+   <bean name="UserTransactionBinding" class="org.jboss.naming.JndiBinder">
+      <property name="target">
+         <inject bean="UserTransaction"/>
+      </property>
+      <property name="bindTo">UserTransaction</property>
+      <property name="serializable">false</property>
+   </bean>
+
+   <!-- FIXME EMB-2 -->
+   <bean name="UserTransactionBinding2" class="org.jboss.naming.JndiBinder">
+      <property name="target">
+         <inject bean="UserTransaction"/>
+      </property>
+      <property name="bindTo">java:comp/UserTransaction</property>
+      <property name="serializable">false</property>
+   </bean>
+
+
+   <bean name="ResourcesToDeploy2" class="org.jboss.embedded.DeploymentScanner">
+      <property name="filter">
+         <inject bean="DeploymentFilter"/>
+      </property>
+      <property name="mainDeployer">
+         <inject bean="MainDeployer"/>
+      </property>
+      <property name="kernel">
+         <inject bean="jboss.kernel:service=Kernel"/>
+      </property>
+      <property name="directoriesByResource">
+         <list elementClass="java.lang.String">
+            <value>${jboss.embedded.bootstrap.resource.path}conf/jboss-service.xml/../deployers</value>
+         </list>
+      </property>
+   </bean>
+   <bean name="ResourcesToDeploy3" class="org.jboss.embedded.DeploymentScanner">
+      <property name="filter">
+         <inject bean="DeploymentFilter"/>
+      </property>
+      <property name="mainDeployer">
+         <inject bean="MainDeployer"/>
+      </property>
+      <property name="kernel">
+         <inject bean="jboss.kernel:service=Kernel"/>
+      </property>
+      <property name="directoriesByResource">
+         <list elementClass="java.lang.String">
+            <value>${jboss.embedded.bootstrap.resource.path}conf/jboss-service.xml/../deploy</value>
+         </list>
+      </property>
+   </bean>
+</deployment>


Property changes on: trunk/embedded/src/main/resources/javase/conf/bootstrap-beans.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/resources/javase/conf/jboss-service.xml
===================================================================
--- trunk/embedded/src/main/resources/javase/conf/jboss-service.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/resources/javase/conf/jboss-service.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,122 +1,122 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id: jboss-service.xml 58969 2006-12-11 01:17:41Z scott.stark at jboss.org $ -->
-
-<!-- ===================================================================== -->
-<!--  JBoss Server Configuration                                           -->
-<!-- ===================================================================== -->
-
-<server>
-
-   <!-- ==================================================================== -->
-   <!-- Main Deployer                                                        -->
-   <!-- ==================================================================== -->
-   <mbean code="org.jboss.deployment.MainDeployer"
-          name="jboss.system:service=MainDeployer">
-   	<!-- This is used to delegate the deployment handling -->
-      <attribute name="KernelMainDeployer"><inject bean="MainDeployer" /></attribute>
-   </mbean>
-
-   <!-- ==================================================================== -->
-   <!-- SAR Deployer                                                        -->
-   <!-- ==================================================================== -->
-   <mbean code="org.jboss.deployment.SARDeployer"
-          name="jboss.system:service=ServiceDeployer">
-      <depends>jboss.system:service=MainDeployer</depends>
-   </mbean>
-
-   <!-- ==================================================================== -->
-   <!-- Security                                                             -->
-   <!-- ==================================================================== -->
-
-   <!-- JAAS security manager and realm mapping -->
-   <mbean code="org.jboss.security.plugins.JaasSecurityManagerService"
-      name="jboss.security:service=JaasSecurityManager">
-      <!-- A flag which indicates whether the SecurityAssociation server mode
-      is set on service creation. This is true by default since the
-      SecurityAssociation should be thread local for multi-threaded server
-      operation.
-      -->
-      <attribute name="ServerMode">true</attribute>
-      <attribute name="SecurityManagerClassName">org.jboss.security.plugins.JaasSecurityManager</attribute>
-      <attribute name="DefaultUnauthenticatedPrincipal">anonymous</attribute> 
-      <!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
-      in seconds.
-      If you want to disable caching of security credentials, set this to 0 to
-      force authentication to occur every time. This has no affect if the
-      AuthenticationCacheJndiName has been changed from the default value.
-      -->
-       <attribute name="DefaultCacheTimeout">1800</attribute>
-      <!-- DefaultCacheResolution: Specifies the default timed cache policy
-      resolution in seconds. This controls the interval at which the cache
-      current timestamp is updated and should be less than the DefaultCacheTimeout
-      in order for the timeout to be meaningful. This has no affect if the
-      AuthenticationCacheJndiName has been changed from the default value.
-      -->
-      <attribute name="DefaultCacheResolution">60</attribute>
-      <!-- DeepCopySubjectMode: This set the copy mode of subjects done by the
-      security managers to be deep copies that makes copies of the subject
-      principals and credentials if they are cloneable. It should be set to
-      true if subject include mutable content that can be corrupted when
-      multiple threads have the same identity and cache flushes/logout clearing
-      the subject in one thread results in subject references affecting other
-      threads.
-      -->
-      <attribute name="DeepCopySubjectMode">false</attribute>
-   </mbean> 
-
-   <!-- Authorization manager-->
-   <mbean code="org.jboss.security.plugins.AuthorizationManagerService"
-      name="jboss.security:service=AuthorizationManager"> 
-      <attribute name="AuthorizationManagerClassName">org.jboss.security.plugins.JBossAuthorizationManager</attribute>
-   </mbean>
-
-   <!-- ==================================================================== -->
-   <!-- Transactions                                                         -->
-   <!-- ==================================================================== -->
-   
-   <!-- JBossTS JTA -->
-   <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
-      name="jboss:service=TransactionManager">
-      <attribute name="TransactionTimeout">300</attribute>
-      <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>      
-   </mbean>
-
-   <mbean code="org.jboss.util.threadpool.BasicThreadPool"
-          name="jboss.jca:service=WorkManagerThreadPool">
-      <!-- The name that appears in thread names -->
-      <attribute name="Name">WorkManager</attribute>
-      <!-- The maximum amount of work in the queue -->
-      <attribute name="MaximumQueueSize">1024</attribute>
-      <!-- The maximum number of active threads -->
-      <attribute name="MaximumPoolSize">100</attribute>
-      <!-- How long to keep threads alive after their last work (default one minute) -->
-      <attribute name="KeepAliveTime">60000</attribute>
-   </mbean>
-
-   <mbean code="org.jboss.resource.work.JBossWorkManager"
-          name="jboss.jca:service=WorkManager">
-      <depends optional-attribute-name="ThreadPoolName">jboss.jca:service=WorkManagerThreadPool</depends>
-      <depends optional-attribute-name="XATerminatorName">jboss:service=TransactionManager</depends>
-   </mbean>
-
-   <!--
-      | The CachedConnectionManager is used partly to relay started UserTransactions to 
-      | open connections so they may be enrolled in the new tx.
-    -->
-   <mbean code="org.jboss.resource.connectionmanager.CachedConnectionManager"
-          name="jboss.jca:service=CachedConnectionManager">
-     <depends optional-attribute-name="TransactionManagerServiceName">jboss:service=TransactionManager</depends>
-
-     <!-- Enable connection close debug monitoring -->
-     <attribute name="Debug">true</attribute>
-
-   </mbean>
-
-   <mbean code="org.jboss.naming.JNDIView"
-   	name="jboss:service=JNDIView">
-   	<!-- The HANamingService service name -->
-   	<attribute name="HANamingService">jboss:service=HAJNDI</attribute>
-   </mbean>
-
-</server>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: jboss-service.xml 58969 2006-12-11 01:17:41Z scott.stark at jboss.org $ -->
+
+<!-- ===================================================================== -->
+<!--  JBoss Server Configuration                                           -->
+<!-- ===================================================================== -->
+
+<server>
+
+   <!-- ==================================================================== -->
+   <!-- Main Deployer                                                        -->
+   <!-- ==================================================================== -->
+   <mbean code="org.jboss.deployment.MainDeployer"
+          name="jboss.system:service=MainDeployer">
+   	<!-- This is used to delegate the deployment handling -->
+      <attribute name="KernelMainDeployer"><inject bean="MainDeployer" /></attribute>
+   </mbean>
+
+   <!-- ==================================================================== -->
+   <!-- SAR Deployer                                                        -->
+   <!-- ==================================================================== -->
+   <mbean code="org.jboss.deployment.SARDeployer"
+          name="jboss.system:service=ServiceDeployer">
+      <depends>jboss.system:service=MainDeployer</depends>
+   </mbean>
+
+   <!-- ==================================================================== -->
+   <!-- Security                                                             -->
+   <!-- ==================================================================== -->
+
+   <!-- JAAS security manager and realm mapping -->
+   <mbean code="org.jboss.security.plugins.JaasSecurityManagerService"
+      name="jboss.security:service=JaasSecurityManager">
+      <!-- A flag which indicates whether the SecurityAssociation server mode
+      is set on service creation. This is true by default since the
+      SecurityAssociation should be thread local for multi-threaded server
+      operation.
+      -->
+      <attribute name="ServerMode">true</attribute>
+      <attribute name="SecurityManagerClassName">org.jboss.security.plugins.JaasSecurityManager</attribute>
+      <attribute name="DefaultUnauthenticatedPrincipal">anonymous</attribute> 
+      <!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
+      in seconds.
+      If you want to disable caching of security credentials, set this to 0 to
+      force authentication to occur every time. This has no affect if the
+      AuthenticationCacheJndiName has been changed from the default value.
+      -->
+       <attribute name="DefaultCacheTimeout">1800</attribute>
+      <!-- DefaultCacheResolution: Specifies the default timed cache policy
+      resolution in seconds. This controls the interval at which the cache
+      current timestamp is updated and should be less than the DefaultCacheTimeout
+      in order for the timeout to be meaningful. This has no affect if the
+      AuthenticationCacheJndiName has been changed from the default value.
+      -->
+      <attribute name="DefaultCacheResolution">60</attribute>
+      <!-- DeepCopySubjectMode: This set the copy mode of subjects done by the
+      security managers to be deep copies that makes copies of the subject
+      principals and credentials if they are cloneable. It should be set to
+      true if subject include mutable content that can be corrupted when
+      multiple threads have the same identity and cache flushes/logout clearing
+      the subject in one thread results in subject references affecting other
+      threads.
+      -->
+      <attribute name="DeepCopySubjectMode">false</attribute>
+   </mbean> 
+
+   <!-- Authorization manager-->
+   <mbean code="org.jboss.security.plugins.AuthorizationManagerService"
+      name="jboss.security:service=AuthorizationManager"> 
+      <attribute name="AuthorizationManagerClassName">org.jboss.security.plugins.JBossAuthorizationManager</attribute>
+   </mbean>
+
+   <!-- ==================================================================== -->
+   <!-- Transactions                                                         -->
+   <!-- ==================================================================== -->
+   
+   <!-- JBossTS JTA -->
+   <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
+      name="jboss:service=TransactionManager">
+      <attribute name="TransactionTimeout">300</attribute>
+      <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>      
+   </mbean>
+
+   <mbean code="org.jboss.util.threadpool.BasicThreadPool"
+          name="jboss.jca:service=WorkManagerThreadPool">
+      <!-- The name that appears in thread names -->
+      <attribute name="Name">WorkManager</attribute>
+      <!-- The maximum amount of work in the queue -->
+      <attribute name="MaximumQueueSize">1024</attribute>
+      <!-- The maximum number of active threads -->
+      <attribute name="MaximumPoolSize">100</attribute>
+      <!-- How long to keep threads alive after their last work (default one minute) -->
+      <attribute name="KeepAliveTime">60000</attribute>
+   </mbean>
+
+   <mbean code="org.jboss.resource.work.JBossWorkManager"
+          name="jboss.jca:service=WorkManager">
+      <depends optional-attribute-name="ThreadPoolName">jboss.jca:service=WorkManagerThreadPool</depends>
+      <depends optional-attribute-name="XATerminatorName">jboss:service=TransactionManager</depends>
+   </mbean>
+
+   <!--
+      | The CachedConnectionManager is used partly to relay started UserTransactions to 
+      | open connections so they may be enrolled in the new tx.
+    -->
+   <mbean code="org.jboss.resource.connectionmanager.CachedConnectionManager"
+          name="jboss.jca:service=CachedConnectionManager">
+     <depends optional-attribute-name="TransactionManagerServiceName">jboss:service=TransactionManager</depends>
+
+     <!-- Enable connection close debug monitoring -->
+     <attribute name="Debug">true</attribute>
+
+   </mbean>
+
+   <mbean code="org.jboss.naming.JNDIView"
+   	name="jboss:service=JNDIView">
+   	<!-- The HANamingService service name -->
+   	<attribute name="HANamingService">jboss:service=HAJNDI</attribute>
+   </mbean>
+
+</server>


Property changes on: trunk/embedded/src/main/resources/javase/conf/jboss-service.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/conf/login-config.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/deploy/ejb3-interceptors-aop.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/deploy/hsqldb-ds.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/resources/javase/deploy/remoting-service.xml
===================================================================
--- trunk/embedded/src/main/resources/javase/deploy/remoting-service.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/resources/javase/deploy/remoting-service.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Connector for both EJB3 and JNDI
--->
-<server>
-   <mbean code="org.jboss.remoting.transport.Connector"
-          name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
-      <attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute>
-      <attribute name="Configuration">
-         <handlers>
-            <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
-         </handlers>
-      </attribute>
-   </mbean>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Connector for both EJB3 and JNDI
+-->
+<server>
+   <mbean code="org.jboss.remoting.transport.Connector"
+          name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
+      <attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute>
+      <attribute name="Configuration">
+         <handlers>
+            <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
+         </handlers>
+      </attribute>
+   </mbean>
 </server>
\ No newline at end of file


Property changes on: trunk/embedded/src/main/resources/javase/deploy/remoting-service.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/resources/javase/deployers/aspect-deployer-beans.xml
===================================================================
--- trunk/embedded/src/main/resources/javase/deployers/aspect-deployer-beans.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/resources/javase/deployers/aspect-deployer-beans.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,53 +1,53 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-    Aspect  Deployer
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.embedded.JBossEmbeddedUCLIntegration"/>
-
-   <!--
-      Valid values for the AspectManager bean for use with enableTransformer=true are:
-      * org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
-      * org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
-   -->
-   <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
-      <constructor>
-         <parameter><![CDATA[
-	         <aop>
-				</aop>]]>
-	      </parameter>
-      </constructor>
-
-      <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
-
-      <property name="enableLoadtimeWeaving">false</property>
-      <!-- only relevant when EnableLoadtimeWeaving is true.
-           When transformer is on, every loaded class gets
-           transformed.  If AOP can't find the class, then it
-           throws an exception.  Sometimes, classes may not have
-           all the classes they reference.  So, the Suppressing
-           is needed.  (i.e. Jboss cache in the default configuration -->
-      <property name="suppressTransformationErrors">true</property>
-      <property name="prune">true</property>
-      <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
-      <property name="exclude">org.jboss.</property>
-      <!-- This avoids instrumentation of hibernate cglib enhanced proxies
-      <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
-      <property name="optimized">true</property>
-      <property name="verbose">false</property>
-      <!--
-         Available choices for this attribute are:
-            org.jboss.aop.instrument.ClassicInstrumentor (default)
-            org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
-       <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
-      -->
-   </bean>
-
-   <!-- Aspect Deployment -->
-   <bean name="AspectDeployer" class="org.jboss.aop.deployers.AspectDeployer">
-      <property name="aspectManager"><inject bean="AspectManager" property="aspectManager"/></property>
-   </bean>
-
-</deployment>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    Aspect  Deployer
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.embedded.JBossEmbeddedUCLIntegration"/>
+
+   <!--
+      Valid values for the AspectManager bean for use with enableTransformer=true are:
+      * org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
+      * org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
+   -->
+   <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
+      <constructor>
+         <parameter><![CDATA[
+	         <aop>
+				</aop>]]>
+	      </parameter>
+      </constructor>
+
+      <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
+
+      <property name="enableLoadtimeWeaving">false</property>
+      <!-- only relevant when EnableLoadtimeWeaving is true.
+           When transformer is on, every loaded class gets
+           transformed.  If AOP can't find the class, then it
+           throws an exception.  Sometimes, classes may not have
+           all the classes they reference.  So, the Suppressing
+           is needed.  (i.e. Jboss cache in the default configuration -->
+      <property name="suppressTransformationErrors">true</property>
+      <property name="prune">true</property>
+      <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
+      <property name="exclude">org.jboss.</property>
+      <!-- This avoids instrumentation of hibernate cglib enhanced proxies
+      <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
+      <property name="optimized">true</property>
+      <property name="verbose">false</property>
+      <!--
+         Available choices for this attribute are:
+            org.jboss.aop.instrument.ClassicInstrumentor (default)
+            org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
+       <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
+      -->
+   </bean>
+
+   <!-- Aspect Deployment -->
+   <bean name="AspectDeployer" class="org.jboss.aop.deployers.AspectDeployer">
+      <property name="aspectManager"><inject bean="AspectManager" property="aspectManager"/></property>
+   </bean>
+
+</deployment>


Property changes on: trunk/embedded/src/main/resources/javase/deployers/aspect-deployer-beans.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/deployers/ejb-deployer-beans.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/deployers/ejb3-deployers-beans.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/resources/javase/deployers/jboss-aspect-library-beans.xml
===================================================================
--- trunk/embedded/src/main/resources/javase/deployers/jboss-aspect-library-beans.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/resources/javase/deployers/jboss-aspect-library-beans.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-    Aspect  Deployer
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <!-- Aspect Library -->
-   <bean name="AspectLibrary" class="org.jboss.aop.deployers.JBossAspectLibrary">
-      <property name="aspectManager"><inject bean="AspectManager"/></property>
-   </bean>
-
-   <!-- Add the JMX -->
-   <aop:lifecycle-configure xmlns:aop="urn:jboss:aop-beans:1.0"
-               name="JMXAdvice"
-               class="org.jboss.aop.microcontainer.aspects.jmx.JMXLifecycleCallback"
-               classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
-               manager-bean="AspectManager"
-               manager-property="aspectManager">
-      <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
-   </aop:lifecycle-configure>
-
-</deployment>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    Aspect  Deployer
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- Aspect Library -->
+   <bean name="AspectLibrary" class="org.jboss.aop.deployers.JBossAspectLibrary">
+      <property name="aspectManager"><inject bean="AspectManager"/></property>
+   </bean>
+
+   <!-- Add the JMX -->
+   <aop:lifecycle-configure xmlns:aop="urn:jboss:aop-beans:1.0"
+               name="JMXAdvice"
+               class="org.jboss.aop.microcontainer.aspects.jmx.JMXLifecycleCallback"
+               classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
+               manager-bean="AspectManager"
+               manager-property="aspectManager">
+      <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+   </aop:lifecycle-configure>
+
+</deployment>


Property changes on: trunk/embedded/src/main/resources/javase/deployers/jboss-aspect-library-beans.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/deployers/jca-deployers-beans.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/deployers/metadata-deployer-beans.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/resources/javase/deployers/security-deployer-beans.xml
===================================================================
--- trunk/embedded/src/main/resources/javase/deployers/security-deployer-beans.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/resources/javase/deployers/security-deployer-beans.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-    Security Deployer
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-   <bean name="SecurityDeployer" class="org.jboss.deployment.security.SecurityDeployer">
-      <property name="ignoreSuffixes">
-          <set elementClass="java.lang.String">
-               <value>xml</value>
-               <value>beans</value>
-               <value>deployer</value>
-               <value>rar</value>
-               <value>properties</value>
-          </set>
-       </property>
-   </bean>
-
-   <!-- JNDI Object Factory to establish SecurityDomainContext objects -->
-   <bean name="SecurityDomainObjectFactory" class="org.jboss.security.integration.SecurityDomainObjectFactory" />
-
-   <!-- JNDI Context legacy establishment of java:/jaas/securityDomain -->
-   <bean name="JBossSecurityJNDIContextEstablishment" class="org.jboss.security.integration.JNDIContextEstablishment"/>
-
-   <!-- JNDI Based Security Management -->
-   <bean name="JNDIBasedSecurityManagement" class="org.jboss.security.integration.JNDIBasedSecurityManagement">
-   </bean>
-
-   <bean name="XMLLoginConfig" class="org.jboss.security.auth.login.XMLLoginConfig">
-      <property name="configResource">login-config.xml</property>
-   </bean>
-
-   <bean name="SecurityConfig" class="org.jboss.security.plugins.SecurityConfig">
-      <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
-      <property name="loginConfig">jboss.security:service=XMLLoginConfig</property>
-      <depends>jboss.security:service=XMLLoginConfig</depends>
-   </bean>
-
-</deployment>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    Security Deployer
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <bean name="SecurityDeployer" class="org.jboss.deployment.security.SecurityDeployer">
+      <property name="ignoreSuffixes">
+          <set elementClass="java.lang.String">
+               <value>xml</value>
+               <value>beans</value>
+               <value>deployer</value>
+               <value>rar</value>
+               <value>properties</value>
+          </set>
+       </property>
+   </bean>
+
+   <!-- JNDI Object Factory to establish SecurityDomainContext objects -->
+   <bean name="SecurityDomainObjectFactory" class="org.jboss.security.integration.SecurityDomainObjectFactory" />
+
+   <!-- JNDI Context legacy establishment of java:/jaas/securityDomain -->
+   <bean name="JBossSecurityJNDIContextEstablishment" class="org.jboss.security.integration.JNDIContextEstablishment"/>
+
+   <!-- JNDI Based Security Management -->
+   <bean name="JNDIBasedSecurityManagement" class="org.jboss.security.integration.JNDIBasedSecurityManagement">
+   </bean>
+
+   <bean name="XMLLoginConfig" class="org.jboss.security.auth.login.XMLLoginConfig">
+      <property name="configResource">login-config.xml</property>
+   </bean>
+
+   <bean name="SecurityConfig" class="org.jboss.security.plugins.SecurityConfig">
+      <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+      <property name="loginConfig">jboss.security:service=XMLLoginConfig</property>
+      <depends>jboss.security:service=XMLLoginConfig</depends>
+   </bean>
+
+</deployment>


Property changes on: trunk/embedded/src/main/resources/javase/deployers/security-deployer-beans.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/main/resources/javase/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/resources/javase/stylesheets/NoJRMPConnectionFactoryTemplate.xsl
===================================================================
--- trunk/embedded/src/main/resources/javase/stylesheets/NoJRMPConnectionFactoryTemplate.xsl	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/resources/javase/stylesheets/NoJRMPConnectionFactoryTemplate.xsl	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,790 +1,790 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:output method="xml" indent="yes"/>
-
-  <!--top level template converts to top level "server" tag-->
-  <xsl:template match="datasources|connection-factories"><!--|server|service"-->
-
-    <server>
-
-      <xsl:apply-templates/>
-
-    </server>
-
-  </xsl:template>
-
-
-  <!-- template for generic resource adapters supporting transactions -->
-  <xsl:template match="tx-connection-factory">
-
-    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
-           name="jboss.jca:service=TxCM,name={jndi-name}" 
-           display-name="ConnectionManager for ConnectionFactory {jndi-name}">
-
-      <xsl:choose>
-        <xsl:when test="(xa-transaction) and (track-connection-by-tx)">
-          <attribute name="TrackConnectionByTx">true</attribute>
-          <attribute name="LocalTransactions">false</attribute>
-        </xsl:when>
-        <xsl:when test="(xa-transaction)">
-          <attribute name="TrackConnectionByTx">false</attribute>
-          <attribute name="LocalTransactions">false</attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="TrackConnectionByTx">true</attribute>
-          <attribute name="LocalTransactions">true</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      
-      <xsl:choose>
-        <xsl:when test="wrap-xa-resource">
-          <attribute name="WrapXAResource"><xsl:value-of select="normalize-space(wrap-xa-resource)"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="WrapXAResource">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      
-      <xsl:choose>
-        <xsl:when test="pad-xid">
-          <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="PadXid">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>      
-      
-      <xsl:if test="isSameRM-override-value">
-        <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
-      </xsl:if>
-                  
-      <xsl:if test="xa-resource-timeout">
-         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
-      </xsl:if>
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">generic-mcf</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-      <xsl:call-template name="tx-manager"/>
-
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=TxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-
-  <!--template for generic resource adapters that do not support transactions-->
-  <xsl:template match="no-tx-connection-factory">
-
-    <mbean code="org.jboss.resource.connectionmanager.NoTxConnectionManager" 
-           name="jboss.jca:service=NoTxCM,name={jndi-name}" 
-           display-name="ConnectionManager for ConnectionFactory {jndi-name}">
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">generic-mcf</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=NoTxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-
-  <!-- Template for our jca-jdbc non-XADatasource (local) wrapper, using local transactions. -->
-  <xsl:template match="local-tx-datasource">
-
-    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
-           name="jboss.jca:service=LocalTxCM,name={jndi-name}" 
-           display-name="ConnectionManager for DataSource {jndi-name}">
-
-      <attribute name="TrackConnectionByTx">true</attribute>
-      <attribute name="LocalTransactions">true</attribute>
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">local-wrapper</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-      <xsl:call-template name="tx-manager"/>
-
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=LocalTxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-  <!-- Template for our jca-jdbc non-XADatasource (local) wrapper, using no transactions. -->
-  <xsl:template match="no-tx-datasource">
-
-    <mbean code="org.jboss.resource.connectionmanager.NoTxConnectionManager" 
-           name="jboss.jca:service=NoTxCM,name={jndi-name}"
-           display-name="ConnectionManager for DataSource {jndi-name}">
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">local-wrapper</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=NoTxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-  <!-- Template for our jca-jdbc XADatasource wrapper. -->
-  <xsl:template match="xa-datasource">
-
-    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
-           name="jboss.jca:service=XATxCM,name={jndi-name}"
-           display-name="ConnectionManager for DataSource {jndi-name}">
-
-      <xsl:choose>
-        <xsl:when test="track-connection-by-tx">
-          <attribute name="TrackConnectionByTx">true</attribute>
-          <attribute name="LocalTransactions">false</attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="TrackConnectionByTx">false</attribute>
-          <attribute name="LocalTransactions">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:if test="isSameRM-override-value">
-        <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
-      </xsl:if>
-      
-      <xsl:choose>
-        <xsl:when test="wrap-xa-resource">
-          <attribute name="WrapXAResource"><xsl:value-of select="normalize-space(wrap-xa-resource)"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="WrapXAResource">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      
-      <xsl:choose>
-        <xsl:when test="pad-xid">
-          <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="PadXid">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>      
-      
-      
-      <xsl:if test="xa-resource-timeout">
-         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
-      </xsl:if>
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">xa-wrapper</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-      <xsl:call-template name="tx-manager"/>
-
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=XATxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-  <!-- template to generate a property file format from a set of               -->
-  <!-- <xa-datasource-property name="blah">blah-value</xa-datasource-property> -->
-  <!-- or                                                                      -->
-  <!-- <connection-property name="foo">bar</connection-property>               -->
-  <!-- tags. The newline in the xsl:text element is crucial!                   -->
-  <!-- this makes a property file format, not the ; delimited format-->
-  <xsl:template match="xa-datasource-property|connection-property">
-    <xsl:value-of select="@name"/>=<xsl:value-of select="normalize-space(.)"/><xsl:text>
-</xsl:text>
-  </xsl:template>
-
-  <!-- template to generate the ManagedConnectionFactory mbean for a generic jca adapter -->
-  <xsl:template name="generic-mcf">
-      <depends optional-attribute-name="ManagedConnectionFactoryName">
-      <!--embedded mbean-->
-        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for ConnectionFactory {jndi-name}">
-
-          <xsl:apply-templates select="depends" mode="anonymous"/>
-          <attribute name="ManagedConnectionFactoryProperties">
-            <properties>
-
-              <!--we need the other standard properties here-->
-              <xsl:if test="user-name">
-                <config-property name="UserName" type="java.lang.String"><xsl:value-of select="normalize-space(user-name)"/></config-property>
-              </xsl:if>
-              <xsl:if test="password">
-                <config-property name="Password" type="java.lang.String"><xsl:value-of select="normalize-space(password)"/></config-property>
-              </xsl:if>
-              <xsl:apply-templates select="config-property"/>
-            </properties>
-          </attribute>
-
-          <attribute name="RARName"><xsl:value-of select="rar-name"/></attribute>
-          <attribute name="ConnectionDefinition"><xsl:value-of select="connection-definition"/></attribute>
-
-          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='<xsl:value-of select="rar-name"/>'</depends>
-
-        </mbean>
-      </depends>
-  </xsl:template>
-
-  <!-- template to copy config-property elements.  This actually does a literal copy -->
-  <!-- Please keep this for consistency with the jb4 version which does not do a literal copy -->
-  <xsl:template match="config-property">
-    <config-property name="{@name}" type="{@type}"><xsl:apply-templates/></config-property>
-  </xsl:template>
-
-  <!-- template to generate the ManagedConnectionFactory mbean for our jca-jdbc local wrapper -->
-  <xsl:template name="local-wrapper">
-
-      <depends optional-attribute-name="ManagedConnectionFactoryName">
-      <!--embedded mbean-->
-        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for DataSource {jndi-name}">
-
-          <xsl:apply-templates select="depends" mode="anonymous"/>
-
-          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-local-jdbc.rar'</depends>
-          <attribute name="RARName"><xsl:value-of select="jboss-local-jdbc.rar"/></attribute>
-          <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
-
-          <attribute name="ManagedConnectionFactoryProperties">
-            <properties>
-              <config-property name="ConnectionURL" type="java.lang.String"><xsl:value-of select="normalize-space(connection-url)"/></config-property>
-              <config-property name="DriverClass" type="java.lang.String"><xsl:value-of select="normalize-space(driver-class)"/></config-property>
-
-              <xsl:call-template name="wrapper-common-properties"/>
-              <xsl:if test="connection-property">
-                <config-property name="ConnectionProperties" type="java.lang.String">
-                  <xsl:apply-templates select="connection-property"/>
-                </config-property>
-              </xsl:if>
-
-            </properties>
-          </attribute>
-        </mbean>
-      </depends>
-  </xsl:template>
-
-  <xsl:template name="xa-wrapper">
-     <depends optional-attribute-name="ManagedConnectionFactoryName">
-        <!--embedded mbean-->
-        <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
-              name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}"
-              displayname="ManagedConnectionFactory for DataSource {jndi-name}">
-          
-          <xsl:apply-templates select="depends" mode="anonymous"/>
-
-          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-xa-jdbc.rar'</depends>
-          <attribute name="RARName"><xsl:value-of select="jboss-xa-jdbc.rar"/></attribute>
-          <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
-
-          <attribute name="ManagedConnectionFactoryProperties">
-            <properties>
-              <config-property name="XADataSourceClass" type="java.lang.String"><xsl:value-of select="normalize-space(xa-datasource-class)"/></config-property>
-
-              <config-property name="XADataSourceProperties" type="java.lang.String">
-                <xsl:apply-templates select="xa-datasource-property"/>
-              </config-property>
-              
-              <!-- remove for new XA handling
-              <xsl:if test="isSameRM-override-value">
-                <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
-              </xsl:if>
-              -->
-              <xsl:call-template name="wrapper-common-properties"/>
-
-            </properties>
-          </attribute>
-        </mbean>
-      </depends>
-  </xsl:template>
-
-  <!-- template for the ManagedConnectionFactory properties shared between our local and xa wrappers -->
-  <xsl:template name="wrapper-common-properties">
-
-          <xsl:if test="transaction-isolation">
-            <config-property name="TransactionIsolation" type="java.lang.String"><xsl:value-of select="normalize-space(transaction-isolation)"/></config-property>
-          </xsl:if>
-          <xsl:if test="user-name">
-            <config-property name="UserName" type="java.lang.String"><xsl:value-of select="normalize-space(user-name)"/></config-property>
-          </xsl:if>
-          <xsl:if test="password">
-            <config-property name="Password" type="java.lang.String"><xsl:value-of select="normalize-space(password)"/></config-property>
-          </xsl:if>
-          <xsl:if test="new-connection-sql">
-            <config-property name="NewConnectionSQL" type="java.lang.String"><xsl:value-of select="normalize-space(new-connection-sql)"/></config-property>
-          </xsl:if>
-          <xsl:if test="check-valid-connection-sql">
-            <config-property name="CheckValidConnectionSQL" type="java.lang.String"><xsl:value-of select="normalize-space(check-valid-connection-sql)"/></config-property>
-          </xsl:if>
-          <xsl:if test="valid-connection-checker-class-name">
-            <config-property name="ValidConnectionCheckerClassName" type="java.lang.String"><xsl:value-of select="normalize-space(valid-connection-checker-class-name)"/></config-property>
-          </xsl:if>
-          <xsl:if test="exception-sorter-class-name">
-            <config-property name="ExceptionSorterClassName" type="java.lang.String"><xsl:value-of select="normalize-space(exception-sorter-class-name)"/></config-property>
-          </xsl:if>
-          <xsl:if test="stale-connection-checker-class-name">
-          <config-property name="StaleConnectionCheckerClassName" type="java.lang.String"><xsl:value-of select="normalize-space(stale-connection-checker-class-name)"/></config-property>
-          </xsl:if>
-          <xsl:if test="track-statements">
-            <config-property name="TrackStatements" type="java.lang.String"><xsl:value-of select="normalize-space(track-statements)"/></config-property>
-          </xsl:if>
-          <xsl:if test="prepared-statement-cache-size">
-            <config-property name="PreparedStatementCacheSize" type="int"><xsl:value-of select="normalize-space(prepared-statement-cache-size)"/></config-property>
-          </xsl:if>
-          <xsl:if test="share-prepared-statements">
-            <config-property name="SharePreparedStatements" type="boolean"><xsl:value-of select="normalize-space(share-prepared-statements)"/></config-property>
-          </xsl:if>
-          <xsl:if test="set-tx-query-timeout">
-            <config-property name="TransactionQueryTimeout" type="boolean">true</config-property>
-          </xsl:if>
-          <xsl:if test="query-timeout">
-            <config-property name="QueryTimeout" type="int"><xsl:value-of select="normalize-space(query-timeout)"/></config-property>
-          </xsl:if>
-          <xsl:if test="url-delimeter">
-            <config-property name="URLDelimeter" type="java.lang.String"><xsl:value-of select="normalize-space(url-delimeter)"/></config-property>
-          </xsl:if>
-          <!-- new matching/background validation-->
-          <xsl:choose>
-            <xsl:when test="validate-on-match">
-              <config-property name="ValidateOnMatch" type="boolean"><xsl:value-of select="normalize-space(validate-on-match)"/></config-property>
-            </xsl:when>
-            <xsl:otherwise>
-              <config-property name="ValidateOnMatch" type="boolean">true</config-property>
-            </xsl:otherwise>
-          </xsl:choose>    
-  </xsl:template>
-
-  <!-- template to generate the pool mbean -->
-  <xsl:template name="pool">
-      <xsl:param name="mcf-template">generic-mcf</xsl:param>
-      <depends optional-attribute-name="ManagedConnectionPool">
-
-        <!--embedded mbean-->
-        <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=ManagedConnectionPool,name={jndi-name}" display-name="Connection Pool for DataSource {jndi-name}">
-          <xsl:choose>
-            <xsl:when test="$mcf-template='generic-mcf'">
-              <xsl:call-template name="generic-mcf"/>
-            </xsl:when>
-             <xsl:when test="$mcf-template='local-wrapper'">
-               <xsl:call-template name="local-wrapper"/>
-             </xsl:when>
-             <xsl:when test="$mcf-template='ha-local-wrapper'">
-               <xsl:call-template name="ha-local-wrapper"/>
-             </xsl:when>
-             <xsl:when test="$mcf-template='ha-xa-wrapper'">
-               <xsl:call-template name="ha-xa-wrapper"/>
-             </xsl:when>
-            <xsl:when test="$mcf-template='xa-wrapper'">
-              <xsl:call-template name="xa-wrapper"/>
-            </xsl:when>
-          </xsl:choose>
-          
-          <attribute name="PoolJndiName"><xsl:value-of select="jndi-name"/></attribute>
-          
-          <xsl:choose>
-            <xsl:when test="min-pool-size">
-              <attribute name="MinSize"><xsl:value-of select="min-pool-size"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="MinSize">0</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="max-pool-size">
-              <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="MaxSize">20</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="blocking-timeout-millis">
-              <attribute name="BlockingTimeoutMillis"><xsl:value-of select="blocking-timeout-millis"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="BlockingTimeoutMillis">30000</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="idle-timeout-minutes">
-              <attribute name="IdleTimeoutMinutes"><xsl:value-of select="idle-timeout-minutes"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="IdleTimeoutMinutes">15</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <!-- background validation -->
-          <xsl:choose>            
-            <xsl:when test="background-validation">
-              <attribute name="BackGroundValidation"><xsl:value-of select="background-validation"/></attribute>
-            </xsl:when>            
-            <xsl:otherwise>
-              <attribute name="BackGroundValidation">False</attribute>              
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="background-validation-minutes">
-              <attribute name="BackGroundValidationMinutes"><xsl:value-of select="background-validation-minutes"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="BackGroundValidationMinutes">10</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="prefill">
-              <attribute name="PreFill"><xsl:value-of select="prefill"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="PreFill">False</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="strict-min">
-              <attribute name="StrictMin"><xsl:value-of select="strict-min"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="StrictMin">False</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          
-          
-          <xsl:choose>            
-            <xsl:when test="statistics-formatter">
-              <attribute name="StatisticsFormatter"><xsl:value-of select="statistics-formatter"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="StatisticsFormatter">org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</attribute>
-            </xsl:otherwise>            
-          </xsl:choose>
-          
-          <!--
-		criteria indicates if Subject (from security domain) or app supplied
-            parameters (such as from getConnection(user, pw)) are used to distinguish
-            connections in the pool. Choices are 
-            ByContainerAndApplication (use both), 
-            ByContainer (use Subject),
-            ByApplication (use app supplied params only),
-            ByNothing (all connections are equivalent, usually if adapter supports
-              reauthentication)-->
-          <attribute name="Criteria">
-	    <xsl:choose>
-              <xsl:when test="application-managed-security">ByApplication</xsl:when>
-              <xsl:when test="security-domain-and-application">ByContainerAndApplication</xsl:when>
-              <xsl:when test="security-domain">ByContainer</xsl:when>
-              <xsl:otherwise>ByNothing</xsl:otherwise>
-            </xsl:choose>
-          </attribute>
-         <xsl:choose>
-           <xsl:when test="no-tx-separate-pools">
-             <attribute name="NoTxSeparatePools">true</attribute>
-           </xsl:when>
-         </xsl:choose>
-        </mbean>
-      </depends>
-  </xsl:template>
-
-
-  <!-- template for ConnectionManager attributes shared among all ConnectionManagers.-->
-  <xsl:template name="cm-common">
-
-      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
-      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
-
-      <xsl:if test="security-domain|security-domain-and-application">
-        <attribute name="SecurityDomainJndiName"><xsl:value-of select="security-domain|security-domain-and-application"/></attribute>
-        <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
-      </xsl:if>
-
-  </xsl:template>
-
-  <!-- Datasource binding -->
-  <xsl:template name="ds-binding">
-    <xsl:param name="cm-name"></xsl:param>
-
-    <mbean code="org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService" 
-           name="jboss.jca:service=DataSourceBinding,name={jndi-name}" 
-           display-name="Binding for DataSource {jndi-name}">
-      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
-      <!--
-      <xsl:choose>
-         <xsl:when test="use-java-context">
-            <xsl:call-template name="use-java-context">
-               <xsl:with-param name="use-java"><xsl:value-of select="use-java-context"/></xsl:with-param>
-            </xsl:call-template>
-         </xsl:when>
-         <xsl:otherwise>
-            <attribute name="UseJavaContext">true</attribute>
-         </xsl:otherwise>
-       </xsl:choose>
-      -->
-      <xsl:choose>
-        <xsl:when test="use-java-context">
-          <attribute name="UseJavaContext"><xsl:value-of select="use-java-context"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="UseJavaContext">true</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      <depends optional-attribute-name="ConnectionManager">
-         <xsl:value-of select="$cm-name"/>,name=<xsl:value-of select="jndi-name"/>
-      </depends>
-      <xsl:choose>
-        <xsl:when test="jmx-invoker-name">
-          <depends optional-attribute-name="JMXInvokerName"><xsl:value-of select="jmx-invoker-name"/></depends>
-        </xsl:when>
-        <xsl:otherwise>
-          <depends optional-attribute-name="JMXInvokerName">jboss:service=invoker,type=jrmp</depends>
-        </xsl:otherwise>
-      </xsl:choose>
-    
-    </mbean>
-  </xsl:template>
-
-   <xsl:template name="use-java-context">
-      <xsl:param name="use-java" />
-      <attribute name="UseJavaContext"><xsl:value-of select="$use-java"/></attribute>
-      <!-- Only assign the JMXInvokerName attribute and dependency if use-java-context is false -->
-      <xsl:if test="$use-java = 'false'">
-         <xsl:choose>
-            <xsl:when test="jmx-invoker-name">
-               <depends optional-attribute-name="JMXInvokerName"><xsl:value-of select="jmx-invoker-name"/></depends>
-            </xsl:when>
-            <xsl:otherwise>
-               <depends optional-attribute-name="JMXInvokerName">jboss:service=invoker,type=jrmp</depends>
-            </xsl:otherwise>
-         </xsl:choose>
-      </xsl:if>
-   </xsl:template>
-
-  <!-- Connection factory binding -->
-  <xsl:template name="cf-binding">
-    <xsl:param name="cm-name"></xsl:param>
-
-    <mbean code="org.jboss.resource.connectionmanager.ConnectionFactoryBindingService" 
-           name="jboss.jca:service=DataSourceBinding,name={jndi-name}" 
-           display-name="Binding for ConnectionFactory {jndi-name}">
-      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
-      <xsl:choose>
-         <xsl:when test="use-java-context">
-            <attribute name="UseJavaContext"><xsl:value-of select="use-java-context"/></attribute>
-         </xsl:when>
-         <xsl:otherwise>
-            <attribute name="UseJavaContext">true</attribute>
-         </xsl:otherwise>
-       </xsl:choose>
-      <depends optional-attribute-name="ConnectionManager">
-         <xsl:value-of select="$cm-name"/>,name=<xsl:value-of select="jndi-name"/>
-      </depends>
-    </mbean>
-  </xsl:template>
-
-  <xsl:template name="tx-manager">
-      <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
-  </xsl:template>
-
-   <xsl:template name="type-mapping">
-      <xsl:param name="datasource"/>
-
-      <xsl:if test="$datasource/metadata or $datasource/type-mapping">
-         <xsl:element name="mbean">
-            <xsl:attribute name="code">org.jboss.ejb.plugins.cmp.jdbc.metadata.DataSourceMetaData</xsl:attribute>
-            <xsl:attribute name="name">
-               <xsl:text>jboss.jdbc:service=metadata,datasource=</xsl:text>
-               <xsl:value-of select="$datasource/jndi-name"/>
-            </xsl:attribute>
-
-            <xsl:element name="depends">
-               <xsl:attribute name="optional-attribute-name">MetadataLibrary</xsl:attribute>
-               <xsl:text>jboss.jdbc:service=metadata</xsl:text>
-            </xsl:element>
-
-            <xsl:if test="$datasource/type-mapping">
-               <xsl:element name="attribute">
-                  <xsl:attribute name="name">TypeMapping</xsl:attribute>
-                  <xsl:value-of select="$datasource/type-mapping"/>
-               </xsl:element>
-            </xsl:if>
-
-            <!-- DEPRECATED in favor of type-mapping -->
-            <xsl:if test="$datasource/metadata">
-               <xsl:element name="attribute">
-                  <xsl:attribute name="name">TypeMapping</xsl:attribute>
-                  <xsl:value-of select="$datasource/metadata/type-mapping"/>
-               </xsl:element>
-            </xsl:if>
-         </xsl:element>
-      </xsl:if>
-   </xsl:template>
-
-  <!-- template to copy any anonymous depends elements inside a cf/ds configuration element -->
-  <xsl:template match="depends" mode="anonymous">
-    <depends><xsl:value-of select="."/></depends>
-  </xsl:template>
-
-  <!-- template to copy all other elements literally, mbeans for instance-->
-  <xsl:template match="*|@*|text()">
-    <xsl:copy>
-      <xsl:apply-templates select="*|@*|text()"/>
-    </xsl:copy>
-  </xsl:template>
-
-   <!--
-      | new experimental ha stuff
-   -->
-
-   <xsl:template match="ha-local-tx-datasource">
-
-     <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager"
-            name="jboss.jca:service=LocalTxCM,name={jndi-name}"
-            display-name="ConnectionManager for DataSource {jndi-name}">
-
-       <attribute name="TrackConnectionByTx">true</attribute>
-       <attribute name="LocalTransactions">true</attribute>
-
-       <xsl:call-template name="pool">
-         <xsl:with-param name="mcf-template">ha-local-wrapper</xsl:with-param>
-       </xsl:call-template>
-       <xsl:call-template name="cm-common"/>
-       <xsl:call-template name="tx-manager"/>
-
-     </mbean>
-     <xsl:call-template name="ds-binding">
-        <xsl:with-param name="cm-name">jboss.jca:service=LocalTxCM</xsl:with-param>
-     </xsl:call-template>
-
-     <xsl:call-template name="type-mapping">
-        <xsl:with-param name="datasource" select="."/>
-     </xsl:call-template>
-   </xsl:template>
-
-   <!-- template to generate the ManagedConnectionFactory mbean for our jca-jdbc local wrapper -->
-   <xsl:template name="ha-local-wrapper">
-
-       <depends optional-attribute-name="ManagedConnectionFactoryName">
-       <!--embedded mbean-->
-         <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for DataSource {jndi-name}">
-
-           <xsl:apply-templates select="depends" mode="anonymous"/>
-
-           <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-ha-local-jdbc.rar'</depends>
-           <attribute name="RARName"><xsl:value-of select="jboss-ha-local-jdbc.rar"/></attribute>
-           <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
-
-           <attribute name="ManagedConnectionFactoryProperties">
-             <properties>
-                <config-property name="ConnectionURL" type="java.lang.String"><xsl:value-of select="normalize-space(connection-url)"/></config-property>
-                <config-property name="DriverClass" type="java.lang.String"><xsl:value-of select="normalize-space(driver-class)"/></config-property>
-
-                <xsl:call-template name="wrapper-common-properties"/>
-                <xsl:if test="connection-property">
-                  <config-property name="ConnectionProperties" type="java.lang.String">
-                    <xsl:apply-templates select="connection-property"/>
-                  </config-property>
-                </xsl:if>
-
-             </properties>
-           </attribute>
-         </mbean>
-       </depends>
-   </xsl:template>
-
-   <xsl:template match="ha-xa-datasource">
-
-     <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager"
-            name="jboss.jca:service=XATxCM,name={jndi-name}"
-            display-name="ConnectionManager for DataSource {jndi-name}">
-
-       <xsl:choose>
-         <xsl:when test="track-connection-by-tx">
-           <attribute name="TrackConnectionByTx">true</attribute>
-           <attribute name="LocalTransactions">false</attribute>
-         </xsl:when>
-         <xsl:otherwise>
-           <attribute name="TrackConnectionByTx">false</attribute>
-           <attribute name="LocalTransactions">false</attribute>
-         </xsl:otherwise>
-       </xsl:choose>
-
-      <xsl:if test="xa-resource-timeout">
-         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
-      </xsl:if>
-
-       <xsl:call-template name="pool">
-         <xsl:with-param name="mcf-template">ha-xa-wrapper</xsl:with-param>
-       </xsl:call-template>
-       <xsl:call-template name="cm-common"/>
-       <xsl:call-template name="tx-manager"/>
-
-     </mbean>
-     <xsl:call-template name="ds-binding">
-        <xsl:with-param name="cm-name">jboss.jca:service=XATxCM</xsl:with-param>
-     </xsl:call-template>
-
-     <xsl:call-template name="type-mapping">
-        <xsl:with-param name="datasource" select="."/>
-     </xsl:call-template>
-   </xsl:template>
-
-   <xsl:template name="ha-xa-wrapper">
-      <depends optional-attribute-name="ManagedConnectionFactoryName">
-         <!--embedded mbean-->
-         <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
-               name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}"
-               displayname="ManagedConnectionFactory for DataSource {jndi-name}">
-
-           <xsl:apply-templates select="depends" mode="anonymous"/>
-
-           <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-ha-xa-jdbc.rar'</depends>
-           <attribute name="RARName"><xsl:value-of select="jboss-ha-xa-jdbc.rar"/></attribute>
-           <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
-
-           <attribute name="ManagedConnectionFactoryProperties">
-             <properties>
-               <config-property name="XADataSourceClass" type="java.lang.String"><xsl:value-of select="normalize-space(xa-datasource-class)"/></config-property>
-
-               <config-property name="XADataSourceProperties" type="java.lang.String">
-                 <xsl:apply-templates select="xa-datasource-property"/>
-               </config-property>
-
-               <xsl:if test="isSameRM-override-value">
-                 <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
-               </xsl:if>
-
-                <xsl:if test="url-property">
-                  <config-property name="URLProperty" type="java.lang.String"><xsl:value-of select="normalize-space(url-property)"/></config-property>
-                </xsl:if>
-
-               <xsl:call-template name="wrapper-common-properties"/>
-
-             </properties>
-           </attribute>
-         </mbean>
-       </depends>
-   </xsl:template>
-
-</xsl:stylesheet>
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:output method="xml" indent="yes"/>
+
+  <!--top level template converts to top level "server" tag-->
+  <xsl:template match="datasources|connection-factories"><!--|server|service"-->
+
+    <server>
+
+      <xsl:apply-templates/>
+
+    </server>
+
+  </xsl:template>
+
+
+  <!-- template for generic resource adapters supporting transactions -->
+  <xsl:template match="tx-connection-factory">
+
+    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
+           name="jboss.jca:service=TxCM,name={jndi-name}" 
+           display-name="ConnectionManager for ConnectionFactory {jndi-name}">
+
+      <xsl:choose>
+        <xsl:when test="(xa-transaction) and (track-connection-by-tx)">
+          <attribute name="TrackConnectionByTx">true</attribute>
+          <attribute name="LocalTransactions">false</attribute>
+        </xsl:when>
+        <xsl:when test="(xa-transaction)">
+          <attribute name="TrackConnectionByTx">false</attribute>
+          <attribute name="LocalTransactions">false</attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="TrackConnectionByTx">true</attribute>
+          <attribute name="LocalTransactions">true</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      
+      <xsl:choose>
+        <xsl:when test="wrap-xa-resource">
+          <attribute name="WrapXAResource"><xsl:value-of select="normalize-space(wrap-xa-resource)"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="WrapXAResource">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      
+      <xsl:choose>
+        <xsl:when test="pad-xid">
+          <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="PadXid">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>      
+      
+      <xsl:if test="isSameRM-override-value">
+        <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
+      </xsl:if>
+                  
+      <xsl:if test="xa-resource-timeout">
+         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
+      </xsl:if>
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">generic-mcf</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+      <xsl:call-template name="tx-manager"/>
+
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=TxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+
+  <!--template for generic resource adapters that do not support transactions-->
+  <xsl:template match="no-tx-connection-factory">
+
+    <mbean code="org.jboss.resource.connectionmanager.NoTxConnectionManager" 
+           name="jboss.jca:service=NoTxCM,name={jndi-name}" 
+           display-name="ConnectionManager for ConnectionFactory {jndi-name}">
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">generic-mcf</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=NoTxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+
+  <!-- Template for our jca-jdbc non-XADatasource (local) wrapper, using local transactions. -->
+  <xsl:template match="local-tx-datasource">
+
+    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
+           name="jboss.jca:service=LocalTxCM,name={jndi-name}" 
+           display-name="ConnectionManager for DataSource {jndi-name}">
+
+      <attribute name="TrackConnectionByTx">true</attribute>
+      <attribute name="LocalTransactions">true</attribute>
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">local-wrapper</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+      <xsl:call-template name="tx-manager"/>
+
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=LocalTxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <!-- Template for our jca-jdbc non-XADatasource (local) wrapper, using no transactions. -->
+  <xsl:template match="no-tx-datasource">
+
+    <mbean code="org.jboss.resource.connectionmanager.NoTxConnectionManager" 
+           name="jboss.jca:service=NoTxCM,name={jndi-name}"
+           display-name="ConnectionManager for DataSource {jndi-name}">
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">local-wrapper</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=NoTxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <!-- Template for our jca-jdbc XADatasource wrapper. -->
+  <xsl:template match="xa-datasource">
+
+    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
+           name="jboss.jca:service=XATxCM,name={jndi-name}"
+           display-name="ConnectionManager for DataSource {jndi-name}">
+
+      <xsl:choose>
+        <xsl:when test="track-connection-by-tx">
+          <attribute name="TrackConnectionByTx">true</attribute>
+          <attribute name="LocalTransactions">false</attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="TrackConnectionByTx">false</attribute>
+          <attribute name="LocalTransactions">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:if test="isSameRM-override-value">
+        <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
+      </xsl:if>
+      
+      <xsl:choose>
+        <xsl:when test="wrap-xa-resource">
+          <attribute name="WrapXAResource"><xsl:value-of select="normalize-space(wrap-xa-resource)"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="WrapXAResource">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      
+      <xsl:choose>
+        <xsl:when test="pad-xid">
+          <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="PadXid">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>      
+      
+      
+      <xsl:if test="xa-resource-timeout">
+         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
+      </xsl:if>
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">xa-wrapper</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+      <xsl:call-template name="tx-manager"/>
+
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=XATxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <!-- template to generate a property file format from a set of               -->
+  <!-- <xa-datasource-property name="blah">blah-value</xa-datasource-property> -->
+  <!-- or                                                                      -->
+  <!-- <connection-property name="foo">bar</connection-property>               -->
+  <!-- tags. The newline in the xsl:text element is crucial!                   -->
+  <!-- this makes a property file format, not the ; delimited format-->
+  <xsl:template match="xa-datasource-property|connection-property">
+    <xsl:value-of select="@name"/>=<xsl:value-of select="normalize-space(.)"/><xsl:text>
+</xsl:text>
+  </xsl:template>
+
+  <!-- template to generate the ManagedConnectionFactory mbean for a generic jca adapter -->
+  <xsl:template name="generic-mcf">
+      <depends optional-attribute-name="ManagedConnectionFactoryName">
+      <!--embedded mbean-->
+        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for ConnectionFactory {jndi-name}">
+
+          <xsl:apply-templates select="depends" mode="anonymous"/>
+          <attribute name="ManagedConnectionFactoryProperties">
+            <properties>
+
+              <!--we need the other standard properties here-->
+              <xsl:if test="user-name">
+                <config-property name="UserName" type="java.lang.String"><xsl:value-of select="normalize-space(user-name)"/></config-property>
+              </xsl:if>
+              <xsl:if test="password">
+                <config-property name="Password" type="java.lang.String"><xsl:value-of select="normalize-space(password)"/></config-property>
+              </xsl:if>
+              <xsl:apply-templates select="config-property"/>
+            </properties>
+          </attribute>
+
+          <attribute name="RARName"><xsl:value-of select="rar-name"/></attribute>
+          <attribute name="ConnectionDefinition"><xsl:value-of select="connection-definition"/></attribute>
+
+          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='<xsl:value-of select="rar-name"/>'</depends>
+
+        </mbean>
+      </depends>
+  </xsl:template>
+
+  <!-- template to copy config-property elements.  This actually does a literal copy -->
+  <!-- Please keep this for consistency with the jb4 version which does not do a literal copy -->
+  <xsl:template match="config-property">
+    <config-property name="{@name}" type="{@type}"><xsl:apply-templates/></config-property>
+  </xsl:template>
+
+  <!-- template to generate the ManagedConnectionFactory mbean for our jca-jdbc local wrapper -->
+  <xsl:template name="local-wrapper">
+
+      <depends optional-attribute-name="ManagedConnectionFactoryName">
+      <!--embedded mbean-->
+        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for DataSource {jndi-name}">
+
+          <xsl:apply-templates select="depends" mode="anonymous"/>
+
+          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-local-jdbc.rar'</depends>
+          <attribute name="RARName"><xsl:value-of select="jboss-local-jdbc.rar"/></attribute>
+          <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
+
+          <attribute name="ManagedConnectionFactoryProperties">
+            <properties>
+              <config-property name="ConnectionURL" type="java.lang.String"><xsl:value-of select="normalize-space(connection-url)"/></config-property>
+              <config-property name="DriverClass" type="java.lang.String"><xsl:value-of select="normalize-space(driver-class)"/></config-property>
+
+              <xsl:call-template name="wrapper-common-properties"/>
+              <xsl:if test="connection-property">
+                <config-property name="ConnectionProperties" type="java.lang.String">
+                  <xsl:apply-templates select="connection-property"/>
+                </config-property>
+              </xsl:if>
+
+            </properties>
+          </attribute>
+        </mbean>
+      </depends>
+  </xsl:template>
+
+  <xsl:template name="xa-wrapper">
+     <depends optional-attribute-name="ManagedConnectionFactoryName">
+        <!--embedded mbean-->
+        <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
+              name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}"
+              displayname="ManagedConnectionFactory for DataSource {jndi-name}">
+          
+          <xsl:apply-templates select="depends" mode="anonymous"/>
+
+          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-xa-jdbc.rar'</depends>
+          <attribute name="RARName"><xsl:value-of select="jboss-xa-jdbc.rar"/></attribute>
+          <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
+
+          <attribute name="ManagedConnectionFactoryProperties">
+            <properties>
+              <config-property name="XADataSourceClass" type="java.lang.String"><xsl:value-of select="normalize-space(xa-datasource-class)"/></config-property>
+
+              <config-property name="XADataSourceProperties" type="java.lang.String">
+                <xsl:apply-templates select="xa-datasource-property"/>
+              </config-property>
+              
+              <!-- remove for new XA handling
+              <xsl:if test="isSameRM-override-value">
+                <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
+              </xsl:if>
+              -->
+              <xsl:call-template name="wrapper-common-properties"/>
+
+            </properties>
+          </attribute>
+        </mbean>
+      </depends>
+  </xsl:template>
+
+  <!-- template for the ManagedConnectionFactory properties shared between our local and xa wrappers -->
+  <xsl:template name="wrapper-common-properties">
+
+          <xsl:if test="transaction-isolation">
+            <config-property name="TransactionIsolation" type="java.lang.String"><xsl:value-of select="normalize-space(transaction-isolation)"/></config-property>
+          </xsl:if>
+          <xsl:if test="user-name">
+            <config-property name="UserName" type="java.lang.String"><xsl:value-of select="normalize-space(user-name)"/></config-property>
+          </xsl:if>
+          <xsl:if test="password">
+            <config-property name="Password" type="java.lang.String"><xsl:value-of select="normalize-space(password)"/></config-property>
+          </xsl:if>
+          <xsl:if test="new-connection-sql">
+            <config-property name="NewConnectionSQL" type="java.lang.String"><xsl:value-of select="normalize-space(new-connection-sql)"/></config-property>
+          </xsl:if>
+          <xsl:if test="check-valid-connection-sql">
+            <config-property name="CheckValidConnectionSQL" type="java.lang.String"><xsl:value-of select="normalize-space(check-valid-connection-sql)"/></config-property>
+          </xsl:if>
+          <xsl:if test="valid-connection-checker-class-name">
+            <config-property name="ValidConnectionCheckerClassName" type="java.lang.String"><xsl:value-of select="normalize-space(valid-connection-checker-class-name)"/></config-property>
+          </xsl:if>
+          <xsl:if test="exception-sorter-class-name">
+            <config-property name="ExceptionSorterClassName" type="java.lang.String"><xsl:value-of select="normalize-space(exception-sorter-class-name)"/></config-property>
+          </xsl:if>
+          <xsl:if test="stale-connection-checker-class-name">
+          <config-property name="StaleConnectionCheckerClassName" type="java.lang.String"><xsl:value-of select="normalize-space(stale-connection-checker-class-name)"/></config-property>
+          </xsl:if>
+          <xsl:if test="track-statements">
+            <config-property name="TrackStatements" type="java.lang.String"><xsl:value-of select="normalize-space(track-statements)"/></config-property>
+          </xsl:if>
+          <xsl:if test="prepared-statement-cache-size">
+            <config-property name="PreparedStatementCacheSize" type="int"><xsl:value-of select="normalize-space(prepared-statement-cache-size)"/></config-property>
+          </xsl:if>
+          <xsl:if test="share-prepared-statements">
+            <config-property name="SharePreparedStatements" type="boolean"><xsl:value-of select="normalize-space(share-prepared-statements)"/></config-property>
+          </xsl:if>
+          <xsl:if test="set-tx-query-timeout">
+            <config-property name="TransactionQueryTimeout" type="boolean">true</config-property>
+          </xsl:if>
+          <xsl:if test="query-timeout">
+            <config-property name="QueryTimeout" type="int"><xsl:value-of select="normalize-space(query-timeout)"/></config-property>
+          </xsl:if>
+          <xsl:if test="url-delimeter">
+            <config-property name="URLDelimeter" type="java.lang.String"><xsl:value-of select="normalize-space(url-delimeter)"/></config-property>
+          </xsl:if>
+          <!-- new matching/background validation-->
+          <xsl:choose>
+            <xsl:when test="validate-on-match">
+              <config-property name="ValidateOnMatch" type="boolean"><xsl:value-of select="normalize-space(validate-on-match)"/></config-property>
+            </xsl:when>
+            <xsl:otherwise>
+              <config-property name="ValidateOnMatch" type="boolean">true</config-property>
+            </xsl:otherwise>
+          </xsl:choose>    
+  </xsl:template>
+
+  <!-- template to generate the pool mbean -->
+  <xsl:template name="pool">
+      <xsl:param name="mcf-template">generic-mcf</xsl:param>
+      <depends optional-attribute-name="ManagedConnectionPool">
+
+        <!--embedded mbean-->
+        <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=ManagedConnectionPool,name={jndi-name}" display-name="Connection Pool for DataSource {jndi-name}">
+          <xsl:choose>
+            <xsl:when test="$mcf-template='generic-mcf'">
+              <xsl:call-template name="generic-mcf"/>
+            </xsl:when>
+             <xsl:when test="$mcf-template='local-wrapper'">
+               <xsl:call-template name="local-wrapper"/>
+             </xsl:when>
+             <xsl:when test="$mcf-template='ha-local-wrapper'">
+               <xsl:call-template name="ha-local-wrapper"/>
+             </xsl:when>
+             <xsl:when test="$mcf-template='ha-xa-wrapper'">
+               <xsl:call-template name="ha-xa-wrapper"/>
+             </xsl:when>
+            <xsl:when test="$mcf-template='xa-wrapper'">
+              <xsl:call-template name="xa-wrapper"/>
+            </xsl:when>
+          </xsl:choose>
+          
+          <attribute name="PoolJndiName"><xsl:value-of select="jndi-name"/></attribute>
+          
+          <xsl:choose>
+            <xsl:when test="min-pool-size">
+              <attribute name="MinSize"><xsl:value-of select="min-pool-size"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="MinSize">0</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="max-pool-size">
+              <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="MaxSize">20</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="blocking-timeout-millis">
+              <attribute name="BlockingTimeoutMillis"><xsl:value-of select="blocking-timeout-millis"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="BlockingTimeoutMillis">30000</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="idle-timeout-minutes">
+              <attribute name="IdleTimeoutMinutes"><xsl:value-of select="idle-timeout-minutes"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="IdleTimeoutMinutes">15</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <!-- background validation -->
+          <xsl:choose>            
+            <xsl:when test="background-validation">
+              <attribute name="BackGroundValidation"><xsl:value-of select="background-validation"/></attribute>
+            </xsl:when>            
+            <xsl:otherwise>
+              <attribute name="BackGroundValidation">False</attribute>              
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="background-validation-minutes">
+              <attribute name="BackGroundValidationMinutes"><xsl:value-of select="background-validation-minutes"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="BackGroundValidationMinutes">10</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="prefill">
+              <attribute name="PreFill"><xsl:value-of select="prefill"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="PreFill">False</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="strict-min">
+              <attribute name="StrictMin"><xsl:value-of select="strict-min"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="StrictMin">False</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          
+          
+          <xsl:choose>            
+            <xsl:when test="statistics-formatter">
+              <attribute name="StatisticsFormatter"><xsl:value-of select="statistics-formatter"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="StatisticsFormatter">org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</attribute>
+            </xsl:otherwise>            
+          </xsl:choose>
+          
+          <!--
+		criteria indicates if Subject (from security domain) or app supplied
+            parameters (such as from getConnection(user, pw)) are used to distinguish
+            connections in the pool. Choices are 
+            ByContainerAndApplication (use both), 
+            ByContainer (use Subject),
+            ByApplication (use app supplied params only),
+            ByNothing (all connections are equivalent, usually if adapter supports
+              reauthentication)-->
+          <attribute name="Criteria">
+	    <xsl:choose>
+              <xsl:when test="application-managed-security">ByApplication</xsl:when>
+              <xsl:when test="security-domain-and-application">ByContainerAndApplication</xsl:when>
+              <xsl:when test="security-domain">ByContainer</xsl:when>
+              <xsl:otherwise>ByNothing</xsl:otherwise>
+            </xsl:choose>
+          </attribute>
+         <xsl:choose>
+           <xsl:when test="no-tx-separate-pools">
+             <attribute name="NoTxSeparatePools">true</attribute>
+           </xsl:when>
+         </xsl:choose>
+        </mbean>
+      </depends>
+  </xsl:template>
+
+
+  <!-- template for ConnectionManager attributes shared among all ConnectionManagers.-->
+  <xsl:template name="cm-common">
+
+      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
+      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
+
+      <xsl:if test="security-domain|security-domain-and-application">
+        <attribute name="SecurityDomainJndiName"><xsl:value-of select="security-domain|security-domain-and-application"/></attribute>
+        <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
+      </xsl:if>
+
+  </xsl:template>
+
+  <!-- Datasource binding -->
+  <xsl:template name="ds-binding">
+    <xsl:param name="cm-name"></xsl:param>
+
+    <mbean code="org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService" 
+           name="jboss.jca:service=DataSourceBinding,name={jndi-name}" 
+           display-name="Binding for DataSource {jndi-name}">
+      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
+      <!--
+      <xsl:choose>
+         <xsl:when test="use-java-context">
+            <xsl:call-template name="use-java-context">
+               <xsl:with-param name="use-java"><xsl:value-of select="use-java-context"/></xsl:with-param>
+            </xsl:call-template>
+         </xsl:when>
+         <xsl:otherwise>
+            <attribute name="UseJavaContext">true</attribute>
+         </xsl:otherwise>
+       </xsl:choose>
+      -->
+      <xsl:choose>
+        <xsl:when test="use-java-context">
+          <attribute name="UseJavaContext"><xsl:value-of select="use-java-context"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="UseJavaContext">true</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <depends optional-attribute-name="ConnectionManager">
+         <xsl:value-of select="$cm-name"/>,name=<xsl:value-of select="jndi-name"/>
+      </depends>
+      <xsl:choose>
+        <xsl:when test="jmx-invoker-name">
+          <depends optional-attribute-name="JMXInvokerName"><xsl:value-of select="jmx-invoker-name"/></depends>
+        </xsl:when>
+        <xsl:otherwise>
+          <depends optional-attribute-name="JMXInvokerName">jboss:service=invoker,type=jrmp</depends>
+        </xsl:otherwise>
+      </xsl:choose>
+    
+    </mbean>
+  </xsl:template>
+
+   <xsl:template name="use-java-context">
+      <xsl:param name="use-java" />
+      <attribute name="UseJavaContext"><xsl:value-of select="$use-java"/></attribute>
+      <!-- Only assign the JMXInvokerName attribute and dependency if use-java-context is false -->
+      <xsl:if test="$use-java = 'false'">
+         <xsl:choose>
+            <xsl:when test="jmx-invoker-name">
+               <depends optional-attribute-name="JMXInvokerName"><xsl:value-of select="jmx-invoker-name"/></depends>
+            </xsl:when>
+            <xsl:otherwise>
+               <depends optional-attribute-name="JMXInvokerName">jboss:service=invoker,type=jrmp</depends>
+            </xsl:otherwise>
+         </xsl:choose>
+      </xsl:if>
+   </xsl:template>
+
+  <!-- Connection factory binding -->
+  <xsl:template name="cf-binding">
+    <xsl:param name="cm-name"></xsl:param>
+
+    <mbean code="org.jboss.resource.connectionmanager.ConnectionFactoryBindingService" 
+           name="jboss.jca:service=DataSourceBinding,name={jndi-name}" 
+           display-name="Binding for ConnectionFactory {jndi-name}">
+      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
+      <xsl:choose>
+         <xsl:when test="use-java-context">
+            <attribute name="UseJavaContext"><xsl:value-of select="use-java-context"/></attribute>
+         </xsl:when>
+         <xsl:otherwise>
+            <attribute name="UseJavaContext">true</attribute>
+         </xsl:otherwise>
+       </xsl:choose>
+      <depends optional-attribute-name="ConnectionManager">
+         <xsl:value-of select="$cm-name"/>,name=<xsl:value-of select="jndi-name"/>
+      </depends>
+    </mbean>
+  </xsl:template>
+
+  <xsl:template name="tx-manager">
+      <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
+  </xsl:template>
+
+   <xsl:template name="type-mapping">
+      <xsl:param name="datasource"/>
+
+      <xsl:if test="$datasource/metadata or $datasource/type-mapping">
+         <xsl:element name="mbean">
+            <xsl:attribute name="code">org.jboss.ejb.plugins.cmp.jdbc.metadata.DataSourceMetaData</xsl:attribute>
+            <xsl:attribute name="name">
+               <xsl:text>jboss.jdbc:service=metadata,datasource=</xsl:text>
+               <xsl:value-of select="$datasource/jndi-name"/>
+            </xsl:attribute>
+
+            <xsl:element name="depends">
+               <xsl:attribute name="optional-attribute-name">MetadataLibrary</xsl:attribute>
+               <xsl:text>jboss.jdbc:service=metadata</xsl:text>
+            </xsl:element>
+
+            <xsl:if test="$datasource/type-mapping">
+               <xsl:element name="attribute">
+                  <xsl:attribute name="name">TypeMapping</xsl:attribute>
+                  <xsl:value-of select="$datasource/type-mapping"/>
+               </xsl:element>
+            </xsl:if>
+
+            <!-- DEPRECATED in favor of type-mapping -->
+            <xsl:if test="$datasource/metadata">
+               <xsl:element name="attribute">
+                  <xsl:attribute name="name">TypeMapping</xsl:attribute>
+                  <xsl:value-of select="$datasource/metadata/type-mapping"/>
+               </xsl:element>
+            </xsl:if>
+         </xsl:element>
+      </xsl:if>
+   </xsl:template>
+
+  <!-- template to copy any anonymous depends elements inside a cf/ds configuration element -->
+  <xsl:template match="depends" mode="anonymous">
+    <depends><xsl:value-of select="."/></depends>
+  </xsl:template>
+
+  <!-- template to copy all other elements literally, mbeans for instance-->
+  <xsl:template match="*|@*|text()">
+    <xsl:copy>
+      <xsl:apply-templates select="*|@*|text()"/>
+    </xsl:copy>
+  </xsl:template>
+
+   <!--
+      | new experimental ha stuff
+   -->
+
+   <xsl:template match="ha-local-tx-datasource">
+
+     <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager"
+            name="jboss.jca:service=LocalTxCM,name={jndi-name}"
+            display-name="ConnectionManager for DataSource {jndi-name}">
+
+       <attribute name="TrackConnectionByTx">true</attribute>
+       <attribute name="LocalTransactions">true</attribute>
+
+       <xsl:call-template name="pool">
+         <xsl:with-param name="mcf-template">ha-local-wrapper</xsl:with-param>
+       </xsl:call-template>
+       <xsl:call-template name="cm-common"/>
+       <xsl:call-template name="tx-manager"/>
+
+     </mbean>
+     <xsl:call-template name="ds-binding">
+        <xsl:with-param name="cm-name">jboss.jca:service=LocalTxCM</xsl:with-param>
+     </xsl:call-template>
+
+     <xsl:call-template name="type-mapping">
+        <xsl:with-param name="datasource" select="."/>
+     </xsl:call-template>
+   </xsl:template>
+
+   <!-- template to generate the ManagedConnectionFactory mbean for our jca-jdbc local wrapper -->
+   <xsl:template name="ha-local-wrapper">
+
+       <depends optional-attribute-name="ManagedConnectionFactoryName">
+       <!--embedded mbean-->
+         <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for DataSource {jndi-name}">
+
+           <xsl:apply-templates select="depends" mode="anonymous"/>
+
+           <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-ha-local-jdbc.rar'</depends>
+           <attribute name="RARName"><xsl:value-of select="jboss-ha-local-jdbc.rar"/></attribute>
+           <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
+
+           <attribute name="ManagedConnectionFactoryProperties">
+             <properties>
+                <config-property name="ConnectionURL" type="java.lang.String"><xsl:value-of select="normalize-space(connection-url)"/></config-property>
+                <config-property name="DriverClass" type="java.lang.String"><xsl:value-of select="normalize-space(driver-class)"/></config-property>
+
+                <xsl:call-template name="wrapper-common-properties"/>
+                <xsl:if test="connection-property">
+                  <config-property name="ConnectionProperties" type="java.lang.String">
+                    <xsl:apply-templates select="connection-property"/>
+                  </config-property>
+                </xsl:if>
+
+             </properties>
+           </attribute>
+         </mbean>
+       </depends>
+   </xsl:template>
+
+   <xsl:template match="ha-xa-datasource">
+
+     <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager"
+            name="jboss.jca:service=XATxCM,name={jndi-name}"
+            display-name="ConnectionManager for DataSource {jndi-name}">
+
+       <xsl:choose>
+         <xsl:when test="track-connection-by-tx">
+           <attribute name="TrackConnectionByTx">true</attribute>
+           <attribute name="LocalTransactions">false</attribute>
+         </xsl:when>
+         <xsl:otherwise>
+           <attribute name="TrackConnectionByTx">false</attribute>
+           <attribute name="LocalTransactions">false</attribute>
+         </xsl:otherwise>
+       </xsl:choose>
+
+      <xsl:if test="xa-resource-timeout">
+         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
+      </xsl:if>
+
+       <xsl:call-template name="pool">
+         <xsl:with-param name="mcf-template">ha-xa-wrapper</xsl:with-param>
+       </xsl:call-template>
+       <xsl:call-template name="cm-common"/>
+       <xsl:call-template name="tx-manager"/>
+
+     </mbean>
+     <xsl:call-template name="ds-binding">
+        <xsl:with-param name="cm-name">jboss.jca:service=XATxCM</xsl:with-param>
+     </xsl:call-template>
+
+     <xsl:call-template name="type-mapping">
+        <xsl:with-param name="datasource" select="."/>
+     </xsl:call-template>
+   </xsl:template>
+
+   <xsl:template name="ha-xa-wrapper">
+      <depends optional-attribute-name="ManagedConnectionFactoryName">
+         <!--embedded mbean-->
+         <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
+               name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}"
+               displayname="ManagedConnectionFactory for DataSource {jndi-name}">
+
+           <xsl:apply-templates select="depends" mode="anonymous"/>
+
+           <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-ha-xa-jdbc.rar'</depends>
+           <attribute name="RARName"><xsl:value-of select="jboss-ha-xa-jdbc.rar"/></attribute>
+           <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
+
+           <attribute name="ManagedConnectionFactoryProperties">
+             <properties>
+               <config-property name="XADataSourceClass" type="java.lang.String"><xsl:value-of select="normalize-space(xa-datasource-class)"/></config-property>
+
+               <config-property name="XADataSourceProperties" type="java.lang.String">
+                 <xsl:apply-templates select="xa-datasource-property"/>
+               </config-property>
+
+               <xsl:if test="isSameRM-override-value">
+                 <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
+               </xsl:if>
+
+                <xsl:if test="url-property">
+                  <config-property name="URLProperty" type="java.lang.String"><xsl:value-of select="normalize-space(url-property)"/></config-property>
+                </xsl:if>
+
+               <xsl:call-template name="wrapper-common-properties"/>
+
+             </properties>
+           </attribute>
+         </mbean>
+       </depends>
+   </xsl:template>
+
+</xsl:stylesheet>


Property changes on: trunk/embedded/src/main/resources/javase/stylesheets/NoJRMPConnectionFactoryTemplate.xsl
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/resources/stylesheets/NoJRMPConnectionFactoryTemplate.xsl
===================================================================
--- trunk/embedded/src/main/resources/stylesheets/NoJRMPConnectionFactoryTemplate.xsl	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/resources/stylesheets/NoJRMPConnectionFactoryTemplate.xsl	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,790 +1,790 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:output method="xml" indent="yes"/>
-
-  <!--top level template converts to top level "server" tag-->
-  <xsl:template match="datasources|connection-factories"><!--|server|service"-->
-
-    <server>
-
-      <xsl:apply-templates/>
-
-    </server>
-
-  </xsl:template>
-
-
-  <!-- template for generic resource adapters supporting transactions -->
-  <xsl:template match="tx-connection-factory">
-
-    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
-           name="jboss.jca:service=TxCM,name={jndi-name}" 
-           display-name="ConnectionManager for ConnectionFactory {jndi-name}">
-
-      <xsl:choose>
-        <xsl:when test="(xa-transaction) and (track-connection-by-tx)">
-          <attribute name="TrackConnectionByTx">true</attribute>
-          <attribute name="LocalTransactions">false</attribute>
-        </xsl:when>
-        <xsl:when test="(xa-transaction)">
-          <attribute name="TrackConnectionByTx">false</attribute>
-          <attribute name="LocalTransactions">false</attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="TrackConnectionByTx">true</attribute>
-          <attribute name="LocalTransactions">true</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      
-      <xsl:choose>
-        <xsl:when test="wrap-xa-resource">
-          <attribute name="WrapXAResource"><xsl:value-of select="normalize-space(wrap-xa-resource)"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="WrapXAResource">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      
-      <xsl:choose>
-        <xsl:when test="pad-xid">
-          <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="PadXid">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>      
-      
-      <xsl:if test="isSameRM-override-value">
-        <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
-      </xsl:if>
-                  
-      <xsl:if test="xa-resource-timeout">
-         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
-      </xsl:if>
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">generic-mcf</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-      <xsl:call-template name="tx-manager"/>
-
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=TxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-
-  <!--template for generic resource adapters that do not support transactions-->
-  <xsl:template match="no-tx-connection-factory">
-
-    <mbean code="org.jboss.resource.connectionmanager.NoTxConnectionManager" 
-           name="jboss.jca:service=NoTxCM,name={jndi-name}" 
-           display-name="ConnectionManager for ConnectionFactory {jndi-name}">
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">generic-mcf</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=NoTxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-
-  <!-- Template for our jca-jdbc non-XADatasource (local) wrapper, using local transactions. -->
-  <xsl:template match="local-tx-datasource">
-
-    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
-           name="jboss.jca:service=LocalTxCM,name={jndi-name}" 
-           display-name="ConnectionManager for DataSource {jndi-name}">
-
-      <attribute name="TrackConnectionByTx">true</attribute>
-      <attribute name="LocalTransactions">true</attribute>
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">local-wrapper</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-      <xsl:call-template name="tx-manager"/>
-
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=LocalTxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-  <!-- Template for our jca-jdbc non-XADatasource (local) wrapper, using no transactions. -->
-  <xsl:template match="no-tx-datasource">
-
-    <mbean code="org.jboss.resource.connectionmanager.NoTxConnectionManager" 
-           name="jboss.jca:service=NoTxCM,name={jndi-name}"
-           display-name="ConnectionManager for DataSource {jndi-name}">
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">local-wrapper</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=NoTxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-  <!-- Template for our jca-jdbc XADatasource wrapper. -->
-  <xsl:template match="xa-datasource">
-
-    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
-           name="jboss.jca:service=XATxCM,name={jndi-name}"
-           display-name="ConnectionManager for DataSource {jndi-name}">
-
-      <xsl:choose>
-        <xsl:when test="track-connection-by-tx">
-          <attribute name="TrackConnectionByTx">true</attribute>
-          <attribute name="LocalTransactions">false</attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="TrackConnectionByTx">false</attribute>
-          <attribute name="LocalTransactions">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-
-      <xsl:if test="isSameRM-override-value">
-        <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
-      </xsl:if>
-      
-      <xsl:choose>
-        <xsl:when test="wrap-xa-resource">
-          <attribute name="WrapXAResource"><xsl:value-of select="normalize-space(wrap-xa-resource)"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="WrapXAResource">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      
-      <xsl:choose>
-        <xsl:when test="pad-xid">
-          <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="PadXid">false</attribute>
-        </xsl:otherwise>
-      </xsl:choose>      
-      
-      
-      <xsl:if test="xa-resource-timeout">
-         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
-      </xsl:if>
-
-      <xsl:call-template name="pool">
-        <xsl:with-param name="mcf-template">xa-wrapper</xsl:with-param>
-      </xsl:call-template>
-      <xsl:call-template name="cm-common"/>
-      <xsl:call-template name="tx-manager"/>
-
-    </mbean>
-    <xsl:call-template name="cf-binding">
-       <xsl:with-param name="cm-name">jboss.jca:service=XATxCM</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="type-mapping">
-       <xsl:with-param name="datasource" select="."/>
-    </xsl:call-template>
-  </xsl:template>
-
-  <!-- template to generate a property file format from a set of               -->
-  <!-- <xa-datasource-property name="blah">blah-value</xa-datasource-property> -->
-  <!-- or                                                                      -->
-  <!-- <connection-property name="foo">bar</connection-property>               -->
-  <!-- tags. The newline in the xsl:text element is crucial!                   -->
-  <!-- this makes a property file format, not the ; delimited format-->
-  <xsl:template match="xa-datasource-property|connection-property">
-    <xsl:value-of select="@name"/>=<xsl:value-of select="normalize-space(.)"/><xsl:text>
-</xsl:text>
-  </xsl:template>
-
-  <!-- template to generate the ManagedConnectionFactory mbean for a generic jca adapter -->
-  <xsl:template name="generic-mcf">
-      <depends optional-attribute-name="ManagedConnectionFactoryName">
-      <!--embedded mbean-->
-        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for ConnectionFactory {jndi-name}">
-
-          <xsl:apply-templates select="depends" mode="anonymous"/>
-          <attribute name="ManagedConnectionFactoryProperties">
-            <properties>
-
-              <!--we need the other standard properties here-->
-              <xsl:if test="user-name">
-                <config-property name="UserName" type="java.lang.String"><xsl:value-of select="normalize-space(user-name)"/></config-property>
-              </xsl:if>
-              <xsl:if test="password">
-                <config-property name="Password" type="java.lang.String"><xsl:value-of select="normalize-space(password)"/></config-property>
-              </xsl:if>
-              <xsl:apply-templates select="config-property"/>
-            </properties>
-          </attribute>
-
-          <attribute name="RARName"><xsl:value-of select="rar-name"/></attribute>
-          <attribute name="ConnectionDefinition"><xsl:value-of select="connection-definition"/></attribute>
-
-          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='<xsl:value-of select="rar-name"/>'</depends>
-
-        </mbean>
-      </depends>
-  </xsl:template>
-
-  <!-- template to copy config-property elements.  This actually does a literal copy -->
-  <!-- Please keep this for consistency with the jb4 version which does not do a literal copy -->
-  <xsl:template match="config-property">
-    <config-property name="{@name}" type="{@type}"><xsl:apply-templates/></config-property>
-  </xsl:template>
-
-  <!-- template to generate the ManagedConnectionFactory mbean for our jca-jdbc local wrapper -->
-  <xsl:template name="local-wrapper">
-
-      <depends optional-attribute-name="ManagedConnectionFactoryName">
-      <!--embedded mbean-->
-        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for DataSource {jndi-name}">
-
-          <xsl:apply-templates select="depends" mode="anonymous"/>
-
-          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-local-jdbc.rar'</depends>
-          <attribute name="RARName"><xsl:value-of select="jboss-local-jdbc.rar"/></attribute>
-          <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
-
-          <attribute name="ManagedConnectionFactoryProperties">
-            <properties>
-              <config-property name="ConnectionURL" type="java.lang.String"><xsl:value-of select="normalize-space(connection-url)"/></config-property>
-              <config-property name="DriverClass" type="java.lang.String"><xsl:value-of select="normalize-space(driver-class)"/></config-property>
-
-              <xsl:call-template name="wrapper-common-properties"/>
-              <xsl:if test="connection-property">
-                <config-property name="ConnectionProperties" type="java.lang.String">
-                  <xsl:apply-templates select="connection-property"/>
-                </config-property>
-              </xsl:if>
-
-            </properties>
-          </attribute>
-        </mbean>
-      </depends>
-  </xsl:template>
-
-  <xsl:template name="xa-wrapper">
-     <depends optional-attribute-name="ManagedConnectionFactoryName">
-        <!--embedded mbean-->
-        <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
-              name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}"
-              displayname="ManagedConnectionFactory for DataSource {jndi-name}">
-          
-          <xsl:apply-templates select="depends" mode="anonymous"/>
-
-          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-xa-jdbc.rar'</depends>
-          <attribute name="RARName"><xsl:value-of select="jboss-xa-jdbc.rar"/></attribute>
-          <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
-
-          <attribute name="ManagedConnectionFactoryProperties">
-            <properties>
-              <config-property name="XADataSourceClass" type="java.lang.String"><xsl:value-of select="normalize-space(xa-datasource-class)"/></config-property>
-
-              <config-property name="XADataSourceProperties" type="java.lang.String">
-                <xsl:apply-templates select="xa-datasource-property"/>
-              </config-property>
-              
-              <!-- remove for new XA handling
-              <xsl:if test="isSameRM-override-value">
-                <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
-              </xsl:if>
-              -->
-              <xsl:call-template name="wrapper-common-properties"/>
-
-            </properties>
-          </attribute>
-        </mbean>
-      </depends>
-  </xsl:template>
-
-  <!-- template for the ManagedConnectionFactory properties shared between our local and xa wrappers -->
-  <xsl:template name="wrapper-common-properties">
-
-          <xsl:if test="transaction-isolation">
-            <config-property name="TransactionIsolation" type="java.lang.String"><xsl:value-of select="normalize-space(transaction-isolation)"/></config-property>
-          </xsl:if>
-          <xsl:if test="user-name">
-            <config-property name="UserName" type="java.lang.String"><xsl:value-of select="normalize-space(user-name)"/></config-property>
-          </xsl:if>
-          <xsl:if test="password">
-            <config-property name="Password" type="java.lang.String"><xsl:value-of select="normalize-space(password)"/></config-property>
-          </xsl:if>
-          <xsl:if test="new-connection-sql">
-            <config-property name="NewConnectionSQL" type="java.lang.String"><xsl:value-of select="normalize-space(new-connection-sql)"/></config-property>
-          </xsl:if>
-          <xsl:if test="check-valid-connection-sql">
-            <config-property name="CheckValidConnectionSQL" type="java.lang.String"><xsl:value-of select="normalize-space(check-valid-connection-sql)"/></config-property>
-          </xsl:if>
-          <xsl:if test="valid-connection-checker-class-name">
-            <config-property name="ValidConnectionCheckerClassName" type="java.lang.String"><xsl:value-of select="normalize-space(valid-connection-checker-class-name)"/></config-property>
-          </xsl:if>
-          <xsl:if test="exception-sorter-class-name">
-            <config-property name="ExceptionSorterClassName" type="java.lang.String"><xsl:value-of select="normalize-space(exception-sorter-class-name)"/></config-property>
-          </xsl:if>
-          <xsl:if test="stale-connection-checker-class-name">
-          <config-property name="StaleConnectionCheckerClassName" type="java.lang.String"><xsl:value-of select="normalize-space(stale-connection-checker-class-name)"/></config-property>
-          </xsl:if>
-          <xsl:if test="track-statements">
-            <config-property name="TrackStatements" type="java.lang.String"><xsl:value-of select="normalize-space(track-statements)"/></config-property>
-          </xsl:if>
-          <xsl:if test="prepared-statement-cache-size">
-            <config-property name="PreparedStatementCacheSize" type="int"><xsl:value-of select="normalize-space(prepared-statement-cache-size)"/></config-property>
-          </xsl:if>
-          <xsl:if test="share-prepared-statements">
-            <config-property name="SharePreparedStatements" type="boolean"><xsl:value-of select="normalize-space(share-prepared-statements)"/></config-property>
-          </xsl:if>
-          <xsl:if test="set-tx-query-timeout">
-            <config-property name="TransactionQueryTimeout" type="boolean">true</config-property>
-          </xsl:if>
-          <xsl:if test="query-timeout">
-            <config-property name="QueryTimeout" type="int"><xsl:value-of select="normalize-space(query-timeout)"/></config-property>
-          </xsl:if>
-          <xsl:if test="url-delimeter">
-            <config-property name="URLDelimeter" type="java.lang.String"><xsl:value-of select="normalize-space(url-delimeter)"/></config-property>
-          </xsl:if>
-          <!-- new matching/background validation-->
-          <xsl:choose>
-            <xsl:when test="validate-on-match">
-              <config-property name="ValidateOnMatch" type="boolean"><xsl:value-of select="normalize-space(validate-on-match)"/></config-property>
-            </xsl:when>
-            <xsl:otherwise>
-              <config-property name="ValidateOnMatch" type="boolean">true</config-property>
-            </xsl:otherwise>
-          </xsl:choose>    
-  </xsl:template>
-
-  <!-- template to generate the pool mbean -->
-  <xsl:template name="pool">
-      <xsl:param name="mcf-template">generic-mcf</xsl:param>
-      <depends optional-attribute-name="ManagedConnectionPool">
-
-        <!--embedded mbean-->
-        <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=ManagedConnectionPool,name={jndi-name}" display-name="Connection Pool for DataSource {jndi-name}">
-          <xsl:choose>
-            <xsl:when test="$mcf-template='generic-mcf'">
-              <xsl:call-template name="generic-mcf"/>
-            </xsl:when>
-             <xsl:when test="$mcf-template='local-wrapper'">
-               <xsl:call-template name="local-wrapper"/>
-             </xsl:when>
-             <xsl:when test="$mcf-template='ha-local-wrapper'">
-               <xsl:call-template name="ha-local-wrapper"/>
-             </xsl:when>
-             <xsl:when test="$mcf-template='ha-xa-wrapper'">
-               <xsl:call-template name="ha-xa-wrapper"/>
-             </xsl:when>
-            <xsl:when test="$mcf-template='xa-wrapper'">
-              <xsl:call-template name="xa-wrapper"/>
-            </xsl:when>
-          </xsl:choose>
-          
-          <attribute name="PoolJndiName"><xsl:value-of select="jndi-name"/></attribute>
-          
-          <xsl:choose>
-            <xsl:when test="min-pool-size">
-              <attribute name="MinSize"><xsl:value-of select="min-pool-size"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="MinSize">0</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="max-pool-size">
-              <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="MaxSize">20</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="blocking-timeout-millis">
-              <attribute name="BlockingTimeoutMillis"><xsl:value-of select="blocking-timeout-millis"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="BlockingTimeoutMillis">30000</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="idle-timeout-minutes">
-              <attribute name="IdleTimeoutMinutes"><xsl:value-of select="idle-timeout-minutes"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="IdleTimeoutMinutes">15</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <!-- background validation -->
-          <xsl:choose>            
-            <xsl:when test="background-validation">
-              <attribute name="BackGroundValidation"><xsl:value-of select="background-validation"/></attribute>
-            </xsl:when>            
-            <xsl:otherwise>
-              <attribute name="BackGroundValidation">False</attribute>              
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="background-validation-minutes">
-              <attribute name="BackGroundValidationMinutes"><xsl:value-of select="background-validation-minutes"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="BackGroundValidationMinutes">10</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="prefill">
-              <attribute name="PreFill"><xsl:value-of select="prefill"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="PreFill">False</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          <xsl:choose>
-            <xsl:when test="strict-min">
-              <attribute name="StrictMin"><xsl:value-of select="strict-min"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="StrictMin">False</attribute>
-            </xsl:otherwise>
-          </xsl:choose>
-          
-          
-          <xsl:choose>            
-            <xsl:when test="statistics-formatter">
-              <attribute name="StatisticsFormatter"><xsl:value-of select="statistics-formatter"/></attribute>
-            </xsl:when>
-            <xsl:otherwise>
-              <attribute name="StatisticsFormatter">org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</attribute>
-            </xsl:otherwise>            
-          </xsl:choose>
-          
-          <!--
-		criteria indicates if Subject (from security domain) or app supplied
-            parameters (such as from getConnection(user, pw)) are used to distinguish
-            connections in the pool. Choices are 
-            ByContainerAndApplication (use both), 
-            ByContainer (use Subject),
-            ByApplication (use app supplied params only),
-            ByNothing (all connections are equivalent, usually if adapter supports
-              reauthentication)-->
-          <attribute name="Criteria">
-	    <xsl:choose>
-              <xsl:when test="application-managed-security">ByApplication</xsl:when>
-              <xsl:when test="security-domain-and-application">ByContainerAndApplication</xsl:when>
-              <xsl:when test="security-domain">ByContainer</xsl:when>
-              <xsl:otherwise>ByNothing</xsl:otherwise>
-            </xsl:choose>
-          </attribute>
-         <xsl:choose>
-           <xsl:when test="no-tx-separate-pools">
-             <attribute name="NoTxSeparatePools">true</attribute>
-           </xsl:when>
-         </xsl:choose>
-        </mbean>
-      </depends>
-  </xsl:template>
-
-
-  <!-- template for ConnectionManager attributes shared among all ConnectionManagers.-->
-  <xsl:template name="cm-common">
-
-      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
-      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
-
-      <xsl:if test="security-domain|security-domain-and-application">
-        <attribute name="SecurityDomainJndiName"><xsl:value-of select="security-domain|security-domain-and-application"/></attribute>
-        <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
-      </xsl:if>
-
-  </xsl:template>
-
-  <!-- Datasource binding -->
-  <xsl:template name="ds-binding">
-    <xsl:param name="cm-name"></xsl:param>
-
-    <mbean code="org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService" 
-           name="jboss.jca:service=DataSourceBinding,name={jndi-name}" 
-           display-name="Binding for DataSource {jndi-name}">
-      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
-      <!--
-      <xsl:choose>
-         <xsl:when test="use-java-context">
-            <xsl:call-template name="use-java-context">
-               <xsl:with-param name="use-java"><xsl:value-of select="use-java-context"/></xsl:with-param>
-            </xsl:call-template>
-         </xsl:when>
-         <xsl:otherwise>
-            <attribute name="UseJavaContext">true</attribute>
-         </xsl:otherwise>
-       </xsl:choose>
-      -->
-      <xsl:choose>
-        <xsl:when test="use-java-context">
-          <attribute name="UseJavaContext"><xsl:value-of select="use-java-context"/></attribute>
-        </xsl:when>
-        <xsl:otherwise>
-          <attribute name="UseJavaContext">true</attribute>
-        </xsl:otherwise>
-      </xsl:choose>
-      <depends optional-attribute-name="ConnectionManager">
-         <xsl:value-of select="$cm-name"/>,name=<xsl:value-of select="jndi-name"/>
-      </depends>
-      <xsl:choose>
-        <xsl:when test="jmx-invoker-name">
-          <depends optional-attribute-name="JMXInvokerName"><xsl:value-of select="jmx-invoker-name"/></depends>
-        </xsl:when>
-        <xsl:otherwise>
-          <depends optional-attribute-name="JMXInvokerName">jboss:service=invoker,type=jrmp</depends>
-        </xsl:otherwise>
-      </xsl:choose>
-    
-    </mbean>
-  </xsl:template>
-
-   <xsl:template name="use-java-context">
-      <xsl:param name="use-java" />
-      <attribute name="UseJavaContext"><xsl:value-of select="$use-java"/></attribute>
-      <!-- Only assign the JMXInvokerName attribute and dependency if use-java-context is false -->
-      <xsl:if test="$use-java = 'false'">
-         <xsl:choose>
-            <xsl:when test="jmx-invoker-name">
-               <depends optional-attribute-name="JMXInvokerName"><xsl:value-of select="jmx-invoker-name"/></depends>
-            </xsl:when>
-            <xsl:otherwise>
-               <depends optional-attribute-name="JMXInvokerName">jboss:service=invoker,type=jrmp</depends>
-            </xsl:otherwise>
-         </xsl:choose>
-      </xsl:if>
-   </xsl:template>
-
-  <!-- Connection factory binding -->
-  <xsl:template name="cf-binding">
-    <xsl:param name="cm-name"></xsl:param>
-
-    <mbean code="org.jboss.resource.connectionmanager.ConnectionFactoryBindingService" 
-           name="jboss.jca:service=DataSourceBinding,name={jndi-name}" 
-           display-name="Binding for ConnectionFactory {jndi-name}">
-      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
-      <xsl:choose>
-         <xsl:when test="use-java-context">
-            <attribute name="UseJavaContext"><xsl:value-of select="use-java-context"/></attribute>
-         </xsl:when>
-         <xsl:otherwise>
-            <attribute name="UseJavaContext">true</attribute>
-         </xsl:otherwise>
-       </xsl:choose>
-      <depends optional-attribute-name="ConnectionManager">
-         <xsl:value-of select="$cm-name"/>,name=<xsl:value-of select="jndi-name"/>
-      </depends>
-    </mbean>
-  </xsl:template>
-
-  <xsl:template name="tx-manager">
-      <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
-  </xsl:template>
-
-   <xsl:template name="type-mapping">
-      <xsl:param name="datasource"/>
-
-      <xsl:if test="$datasource/metadata or $datasource/type-mapping">
-         <xsl:element name="mbean">
-            <xsl:attribute name="code">org.jboss.ejb.plugins.cmp.jdbc.metadata.DataSourceMetaData</xsl:attribute>
-            <xsl:attribute name="name">
-               <xsl:text>jboss.jdbc:service=metadata,datasource=</xsl:text>
-               <xsl:value-of select="$datasource/jndi-name"/>
-            </xsl:attribute>
-
-            <xsl:element name="depends">
-               <xsl:attribute name="optional-attribute-name">MetadataLibrary</xsl:attribute>
-               <xsl:text>jboss.jdbc:service=metadata</xsl:text>
-            </xsl:element>
-
-            <xsl:if test="$datasource/type-mapping">
-               <xsl:element name="attribute">
-                  <xsl:attribute name="name">TypeMapping</xsl:attribute>
-                  <xsl:value-of select="$datasource/type-mapping"/>
-               </xsl:element>
-            </xsl:if>
-
-            <!-- DEPRECATED in favor of type-mapping -->
-            <xsl:if test="$datasource/metadata">
-               <xsl:element name="attribute">
-                  <xsl:attribute name="name">TypeMapping</xsl:attribute>
-                  <xsl:value-of select="$datasource/metadata/type-mapping"/>
-               </xsl:element>
-            </xsl:if>
-         </xsl:element>
-      </xsl:if>
-   </xsl:template>
-
-  <!-- template to copy any anonymous depends elements inside a cf/ds configuration element -->
-  <xsl:template match="depends" mode="anonymous">
-    <depends><xsl:value-of select="."/></depends>
-  </xsl:template>
-
-  <!-- template to copy all other elements literally, mbeans for instance-->
-  <xsl:template match="*|@*|text()">
-    <xsl:copy>
-      <xsl:apply-templates select="*|@*|text()"/>
-    </xsl:copy>
-  </xsl:template>
-
-   <!--
-      | new experimental ha stuff
-   -->
-
-   <xsl:template match="ha-local-tx-datasource">
-
-     <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager"
-            name="jboss.jca:service=LocalTxCM,name={jndi-name}"
-            display-name="ConnectionManager for DataSource {jndi-name}">
-
-       <attribute name="TrackConnectionByTx">true</attribute>
-       <attribute name="LocalTransactions">true</attribute>
-
-       <xsl:call-template name="pool">
-         <xsl:with-param name="mcf-template">ha-local-wrapper</xsl:with-param>
-       </xsl:call-template>
-       <xsl:call-template name="cm-common"/>
-       <xsl:call-template name="tx-manager"/>
-
-     </mbean>
-     <xsl:call-template name="ds-binding">
-        <xsl:with-param name="cm-name">jboss.jca:service=LocalTxCM</xsl:with-param>
-     </xsl:call-template>
-
-     <xsl:call-template name="type-mapping">
-        <xsl:with-param name="datasource" select="."/>
-     </xsl:call-template>
-   </xsl:template>
-
-   <!-- template to generate the ManagedConnectionFactory mbean for our jca-jdbc local wrapper -->
-   <xsl:template name="ha-local-wrapper">
-
-       <depends optional-attribute-name="ManagedConnectionFactoryName">
-       <!--embedded mbean-->
-         <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for DataSource {jndi-name}">
-
-           <xsl:apply-templates select="depends" mode="anonymous"/>
-
-           <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-ha-local-jdbc.rar'</depends>
-           <attribute name="RARName"><xsl:value-of select="jboss-ha-local-jdbc.rar"/></attribute>
-           <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
-
-           <attribute name="ManagedConnectionFactoryProperties">
-             <properties>
-                <config-property name="ConnectionURL" type="java.lang.String"><xsl:value-of select="normalize-space(connection-url)"/></config-property>
-                <config-property name="DriverClass" type="java.lang.String"><xsl:value-of select="normalize-space(driver-class)"/></config-property>
-
-                <xsl:call-template name="wrapper-common-properties"/>
-                <xsl:if test="connection-property">
-                  <config-property name="ConnectionProperties" type="java.lang.String">
-                    <xsl:apply-templates select="connection-property"/>
-                  </config-property>
-                </xsl:if>
-
-             </properties>
-           </attribute>
-         </mbean>
-       </depends>
-   </xsl:template>
-
-   <xsl:template match="ha-xa-datasource">
-
-     <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager"
-            name="jboss.jca:service=XATxCM,name={jndi-name}"
-            display-name="ConnectionManager for DataSource {jndi-name}">
-
-       <xsl:choose>
-         <xsl:when test="track-connection-by-tx">
-           <attribute name="TrackConnectionByTx">true</attribute>
-           <attribute name="LocalTransactions">false</attribute>
-         </xsl:when>
-         <xsl:otherwise>
-           <attribute name="TrackConnectionByTx">false</attribute>
-           <attribute name="LocalTransactions">false</attribute>
-         </xsl:otherwise>
-       </xsl:choose>
-
-      <xsl:if test="xa-resource-timeout">
-         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
-      </xsl:if>
-
-       <xsl:call-template name="pool">
-         <xsl:with-param name="mcf-template">ha-xa-wrapper</xsl:with-param>
-       </xsl:call-template>
-       <xsl:call-template name="cm-common"/>
-       <xsl:call-template name="tx-manager"/>
-
-     </mbean>
-     <xsl:call-template name="ds-binding">
-        <xsl:with-param name="cm-name">jboss.jca:service=XATxCM</xsl:with-param>
-     </xsl:call-template>
-
-     <xsl:call-template name="type-mapping">
-        <xsl:with-param name="datasource" select="."/>
-     </xsl:call-template>
-   </xsl:template>
-
-   <xsl:template name="ha-xa-wrapper">
-      <depends optional-attribute-name="ManagedConnectionFactoryName">
-         <!--embedded mbean-->
-         <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
-               name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}"
-               displayname="ManagedConnectionFactory for DataSource {jndi-name}">
-
-           <xsl:apply-templates select="depends" mode="anonymous"/>
-
-           <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-ha-xa-jdbc.rar'</depends>
-           <attribute name="RARName"><xsl:value-of select="jboss-ha-xa-jdbc.rar"/></attribute>
-           <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
-
-           <attribute name="ManagedConnectionFactoryProperties">
-             <properties>
-               <config-property name="XADataSourceClass" type="java.lang.String"><xsl:value-of select="normalize-space(xa-datasource-class)"/></config-property>
-
-               <config-property name="XADataSourceProperties" type="java.lang.String">
-                 <xsl:apply-templates select="xa-datasource-property"/>
-               </config-property>
-
-               <xsl:if test="isSameRM-override-value">
-                 <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
-               </xsl:if>
-
-                <xsl:if test="url-property">
-                  <config-property name="URLProperty" type="java.lang.String"><xsl:value-of select="normalize-space(url-property)"/></config-property>
-                </xsl:if>
-
-               <xsl:call-template name="wrapper-common-properties"/>
-
-             </properties>
-           </attribute>
-         </mbean>
-       </depends>
-   </xsl:template>
-
-</xsl:stylesheet>
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:output method="xml" indent="yes"/>
+
+  <!--top level template converts to top level "server" tag-->
+  <xsl:template match="datasources|connection-factories"><!--|server|service"-->
+
+    <server>
+
+      <xsl:apply-templates/>
+
+    </server>
+
+  </xsl:template>
+
+
+  <!-- template for generic resource adapters supporting transactions -->
+  <xsl:template match="tx-connection-factory">
+
+    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
+           name="jboss.jca:service=TxCM,name={jndi-name}" 
+           display-name="ConnectionManager for ConnectionFactory {jndi-name}">
+
+      <xsl:choose>
+        <xsl:when test="(xa-transaction) and (track-connection-by-tx)">
+          <attribute name="TrackConnectionByTx">true</attribute>
+          <attribute name="LocalTransactions">false</attribute>
+        </xsl:when>
+        <xsl:when test="(xa-transaction)">
+          <attribute name="TrackConnectionByTx">false</attribute>
+          <attribute name="LocalTransactions">false</attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="TrackConnectionByTx">true</attribute>
+          <attribute name="LocalTransactions">true</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      
+      <xsl:choose>
+        <xsl:when test="wrap-xa-resource">
+          <attribute name="WrapXAResource"><xsl:value-of select="normalize-space(wrap-xa-resource)"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="WrapXAResource">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      
+      <xsl:choose>
+        <xsl:when test="pad-xid">
+          <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="PadXid">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>      
+      
+      <xsl:if test="isSameRM-override-value">
+        <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
+      </xsl:if>
+                  
+      <xsl:if test="xa-resource-timeout">
+         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
+      </xsl:if>
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">generic-mcf</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+      <xsl:call-template name="tx-manager"/>
+
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=TxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+
+  <!--template for generic resource adapters that do not support transactions-->
+  <xsl:template match="no-tx-connection-factory">
+
+    <mbean code="org.jboss.resource.connectionmanager.NoTxConnectionManager" 
+           name="jboss.jca:service=NoTxCM,name={jndi-name}" 
+           display-name="ConnectionManager for ConnectionFactory {jndi-name}">
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">generic-mcf</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=NoTxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+
+  <!-- Template for our jca-jdbc non-XADatasource (local) wrapper, using local transactions. -->
+  <xsl:template match="local-tx-datasource">
+
+    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
+           name="jboss.jca:service=LocalTxCM,name={jndi-name}" 
+           display-name="ConnectionManager for DataSource {jndi-name}">
+
+      <attribute name="TrackConnectionByTx">true</attribute>
+      <attribute name="LocalTransactions">true</attribute>
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">local-wrapper</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+      <xsl:call-template name="tx-manager"/>
+
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=LocalTxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <!-- Template for our jca-jdbc non-XADatasource (local) wrapper, using no transactions. -->
+  <xsl:template match="no-tx-datasource">
+
+    <mbean code="org.jboss.resource.connectionmanager.NoTxConnectionManager" 
+           name="jboss.jca:service=NoTxCM,name={jndi-name}"
+           display-name="ConnectionManager for DataSource {jndi-name}">
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">local-wrapper</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=NoTxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <!-- Template for our jca-jdbc XADatasource wrapper. -->
+  <xsl:template match="xa-datasource">
+
+    <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" 
+           name="jboss.jca:service=XATxCM,name={jndi-name}"
+           display-name="ConnectionManager for DataSource {jndi-name}">
+
+      <xsl:choose>
+        <xsl:when test="track-connection-by-tx">
+          <attribute name="TrackConnectionByTx">true</attribute>
+          <attribute name="LocalTransactions">false</attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="TrackConnectionByTx">false</attribute>
+          <attribute name="LocalTransactions">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:if test="isSameRM-override-value">
+        <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
+      </xsl:if>
+      
+      <xsl:choose>
+        <xsl:when test="wrap-xa-resource">
+          <attribute name="WrapXAResource"><xsl:value-of select="normalize-space(wrap-xa-resource)"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="WrapXAResource">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      
+      <xsl:choose>
+        <xsl:when test="pad-xid">
+          <attribute name="PadXid"><xsl:value-of select="normalize-space(pad-xid)"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="PadXid">false</attribute>
+        </xsl:otherwise>
+      </xsl:choose>      
+      
+      
+      <xsl:if test="xa-resource-timeout">
+         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
+      </xsl:if>
+
+      <xsl:call-template name="pool">
+        <xsl:with-param name="mcf-template">xa-wrapper</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="cm-common"/>
+      <xsl:call-template name="tx-manager"/>
+
+    </mbean>
+    <xsl:call-template name="cf-binding">
+       <xsl:with-param name="cm-name">jboss.jca:service=XATxCM</xsl:with-param>
+    </xsl:call-template>
+
+    <xsl:call-template name="type-mapping">
+       <xsl:with-param name="datasource" select="."/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <!-- template to generate a property file format from a set of               -->
+  <!-- <xa-datasource-property name="blah">blah-value</xa-datasource-property> -->
+  <!-- or                                                                      -->
+  <!-- <connection-property name="foo">bar</connection-property>               -->
+  <!-- tags. The newline in the xsl:text element is crucial!                   -->
+  <!-- this makes a property file format, not the ; delimited format-->
+  <xsl:template match="xa-datasource-property|connection-property">
+    <xsl:value-of select="@name"/>=<xsl:value-of select="normalize-space(.)"/><xsl:text>
+</xsl:text>
+  </xsl:template>
+
+  <!-- template to generate the ManagedConnectionFactory mbean for a generic jca adapter -->
+  <xsl:template name="generic-mcf">
+      <depends optional-attribute-name="ManagedConnectionFactoryName">
+      <!--embedded mbean-->
+        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for ConnectionFactory {jndi-name}">
+
+          <xsl:apply-templates select="depends" mode="anonymous"/>
+          <attribute name="ManagedConnectionFactoryProperties">
+            <properties>
+
+              <!--we need the other standard properties here-->
+              <xsl:if test="user-name">
+                <config-property name="UserName" type="java.lang.String"><xsl:value-of select="normalize-space(user-name)"/></config-property>
+              </xsl:if>
+              <xsl:if test="password">
+                <config-property name="Password" type="java.lang.String"><xsl:value-of select="normalize-space(password)"/></config-property>
+              </xsl:if>
+              <xsl:apply-templates select="config-property"/>
+            </properties>
+          </attribute>
+
+          <attribute name="RARName"><xsl:value-of select="rar-name"/></attribute>
+          <attribute name="ConnectionDefinition"><xsl:value-of select="connection-definition"/></attribute>
+
+          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='<xsl:value-of select="rar-name"/>'</depends>
+
+        </mbean>
+      </depends>
+  </xsl:template>
+
+  <!-- template to copy config-property elements.  This actually does a literal copy -->
+  <!-- Please keep this for consistency with the jb4 version which does not do a literal copy -->
+  <xsl:template match="config-property">
+    <config-property name="{@name}" type="{@type}"><xsl:apply-templates/></config-property>
+  </xsl:template>
+
+  <!-- template to generate the ManagedConnectionFactory mbean for our jca-jdbc local wrapper -->
+  <xsl:template name="local-wrapper">
+
+      <depends optional-attribute-name="ManagedConnectionFactoryName">
+      <!--embedded mbean-->
+        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for DataSource {jndi-name}">
+
+          <xsl:apply-templates select="depends" mode="anonymous"/>
+
+          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-local-jdbc.rar'</depends>
+          <attribute name="RARName"><xsl:value-of select="jboss-local-jdbc.rar"/></attribute>
+          <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
+
+          <attribute name="ManagedConnectionFactoryProperties">
+            <properties>
+              <config-property name="ConnectionURL" type="java.lang.String"><xsl:value-of select="normalize-space(connection-url)"/></config-property>
+              <config-property name="DriverClass" type="java.lang.String"><xsl:value-of select="normalize-space(driver-class)"/></config-property>
+
+              <xsl:call-template name="wrapper-common-properties"/>
+              <xsl:if test="connection-property">
+                <config-property name="ConnectionProperties" type="java.lang.String">
+                  <xsl:apply-templates select="connection-property"/>
+                </config-property>
+              </xsl:if>
+
+            </properties>
+          </attribute>
+        </mbean>
+      </depends>
+  </xsl:template>
+
+  <xsl:template name="xa-wrapper">
+     <depends optional-attribute-name="ManagedConnectionFactoryName">
+        <!--embedded mbean-->
+        <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
+              name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}"
+              displayname="ManagedConnectionFactory for DataSource {jndi-name}">
+          
+          <xsl:apply-templates select="depends" mode="anonymous"/>
+
+          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-xa-jdbc.rar'</depends>
+          <attribute name="RARName"><xsl:value-of select="jboss-xa-jdbc.rar"/></attribute>
+          <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
+
+          <attribute name="ManagedConnectionFactoryProperties">
+            <properties>
+              <config-property name="XADataSourceClass" type="java.lang.String"><xsl:value-of select="normalize-space(xa-datasource-class)"/></config-property>
+
+              <config-property name="XADataSourceProperties" type="java.lang.String">
+                <xsl:apply-templates select="xa-datasource-property"/>
+              </config-property>
+              
+              <!-- remove for new XA handling
+              <xsl:if test="isSameRM-override-value">
+                <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
+              </xsl:if>
+              -->
+              <xsl:call-template name="wrapper-common-properties"/>
+
+            </properties>
+          </attribute>
+        </mbean>
+      </depends>
+  </xsl:template>
+
+  <!-- template for the ManagedConnectionFactory properties shared between our local and xa wrappers -->
+  <xsl:template name="wrapper-common-properties">
+
+          <xsl:if test="transaction-isolation">
+            <config-property name="TransactionIsolation" type="java.lang.String"><xsl:value-of select="normalize-space(transaction-isolation)"/></config-property>
+          </xsl:if>
+          <xsl:if test="user-name">
+            <config-property name="UserName" type="java.lang.String"><xsl:value-of select="normalize-space(user-name)"/></config-property>
+          </xsl:if>
+          <xsl:if test="password">
+            <config-property name="Password" type="java.lang.String"><xsl:value-of select="normalize-space(password)"/></config-property>
+          </xsl:if>
+          <xsl:if test="new-connection-sql">
+            <config-property name="NewConnectionSQL" type="java.lang.String"><xsl:value-of select="normalize-space(new-connection-sql)"/></config-property>
+          </xsl:if>
+          <xsl:if test="check-valid-connection-sql">
+            <config-property name="CheckValidConnectionSQL" type="java.lang.String"><xsl:value-of select="normalize-space(check-valid-connection-sql)"/></config-property>
+          </xsl:if>
+          <xsl:if test="valid-connection-checker-class-name">
+            <config-property name="ValidConnectionCheckerClassName" type="java.lang.String"><xsl:value-of select="normalize-space(valid-connection-checker-class-name)"/></config-property>
+          </xsl:if>
+          <xsl:if test="exception-sorter-class-name">
+            <config-property name="ExceptionSorterClassName" type="java.lang.String"><xsl:value-of select="normalize-space(exception-sorter-class-name)"/></config-property>
+          </xsl:if>
+          <xsl:if test="stale-connection-checker-class-name">
+          <config-property name="StaleConnectionCheckerClassName" type="java.lang.String"><xsl:value-of select="normalize-space(stale-connection-checker-class-name)"/></config-property>
+          </xsl:if>
+          <xsl:if test="track-statements">
+            <config-property name="TrackStatements" type="java.lang.String"><xsl:value-of select="normalize-space(track-statements)"/></config-property>
+          </xsl:if>
+          <xsl:if test="prepared-statement-cache-size">
+            <config-property name="PreparedStatementCacheSize" type="int"><xsl:value-of select="normalize-space(prepared-statement-cache-size)"/></config-property>
+          </xsl:if>
+          <xsl:if test="share-prepared-statements">
+            <config-property name="SharePreparedStatements" type="boolean"><xsl:value-of select="normalize-space(share-prepared-statements)"/></config-property>
+          </xsl:if>
+          <xsl:if test="set-tx-query-timeout">
+            <config-property name="TransactionQueryTimeout" type="boolean">true</config-property>
+          </xsl:if>
+          <xsl:if test="query-timeout">
+            <config-property name="QueryTimeout" type="int"><xsl:value-of select="normalize-space(query-timeout)"/></config-property>
+          </xsl:if>
+          <xsl:if test="url-delimeter">
+            <config-property name="URLDelimeter" type="java.lang.String"><xsl:value-of select="normalize-space(url-delimeter)"/></config-property>
+          </xsl:if>
+          <!-- new matching/background validation-->
+          <xsl:choose>
+            <xsl:when test="validate-on-match">
+              <config-property name="ValidateOnMatch" type="boolean"><xsl:value-of select="normalize-space(validate-on-match)"/></config-property>
+            </xsl:when>
+            <xsl:otherwise>
+              <config-property name="ValidateOnMatch" type="boolean">true</config-property>
+            </xsl:otherwise>
+          </xsl:choose>    
+  </xsl:template>
+
+  <!-- template to generate the pool mbean -->
+  <xsl:template name="pool">
+      <xsl:param name="mcf-template">generic-mcf</xsl:param>
+      <depends optional-attribute-name="ManagedConnectionPool">
+
+        <!--embedded mbean-->
+        <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=ManagedConnectionPool,name={jndi-name}" display-name="Connection Pool for DataSource {jndi-name}">
+          <xsl:choose>
+            <xsl:when test="$mcf-template='generic-mcf'">
+              <xsl:call-template name="generic-mcf"/>
+            </xsl:when>
+             <xsl:when test="$mcf-template='local-wrapper'">
+               <xsl:call-template name="local-wrapper"/>
+             </xsl:when>
+             <xsl:when test="$mcf-template='ha-local-wrapper'">
+               <xsl:call-template name="ha-local-wrapper"/>
+             </xsl:when>
+             <xsl:when test="$mcf-template='ha-xa-wrapper'">
+               <xsl:call-template name="ha-xa-wrapper"/>
+             </xsl:when>
+            <xsl:when test="$mcf-template='xa-wrapper'">
+              <xsl:call-template name="xa-wrapper"/>
+            </xsl:when>
+          </xsl:choose>
+          
+          <attribute name="PoolJndiName"><xsl:value-of select="jndi-name"/></attribute>
+          
+          <xsl:choose>
+            <xsl:when test="min-pool-size">
+              <attribute name="MinSize"><xsl:value-of select="min-pool-size"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="MinSize">0</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="max-pool-size">
+              <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="MaxSize">20</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="blocking-timeout-millis">
+              <attribute name="BlockingTimeoutMillis"><xsl:value-of select="blocking-timeout-millis"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="BlockingTimeoutMillis">30000</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="idle-timeout-minutes">
+              <attribute name="IdleTimeoutMinutes"><xsl:value-of select="idle-timeout-minutes"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="IdleTimeoutMinutes">15</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <!-- background validation -->
+          <xsl:choose>            
+            <xsl:when test="background-validation">
+              <attribute name="BackGroundValidation"><xsl:value-of select="background-validation"/></attribute>
+            </xsl:when>            
+            <xsl:otherwise>
+              <attribute name="BackGroundValidation">False</attribute>              
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="background-validation-minutes">
+              <attribute name="BackGroundValidationMinutes"><xsl:value-of select="background-validation-minutes"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="BackGroundValidationMinutes">10</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="prefill">
+              <attribute name="PreFill"><xsl:value-of select="prefill"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="PreFill">False</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="strict-min">
+              <attribute name="StrictMin"><xsl:value-of select="strict-min"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="StrictMin">False</attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          
+          
+          <xsl:choose>            
+            <xsl:when test="statistics-formatter">
+              <attribute name="StatisticsFormatter"><xsl:value-of select="statistics-formatter"/></attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <attribute name="StatisticsFormatter">org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</attribute>
+            </xsl:otherwise>            
+          </xsl:choose>
+          
+          <!--
+		criteria indicates if Subject (from security domain) or app supplied
+            parameters (such as from getConnection(user, pw)) are used to distinguish
+            connections in the pool. Choices are 
+            ByContainerAndApplication (use both), 
+            ByContainer (use Subject),
+            ByApplication (use app supplied params only),
+            ByNothing (all connections are equivalent, usually if adapter supports
+              reauthentication)-->
+          <attribute name="Criteria">
+	    <xsl:choose>
+              <xsl:when test="application-managed-security">ByApplication</xsl:when>
+              <xsl:when test="security-domain-and-application">ByContainerAndApplication</xsl:when>
+              <xsl:when test="security-domain">ByContainer</xsl:when>
+              <xsl:otherwise>ByNothing</xsl:otherwise>
+            </xsl:choose>
+          </attribute>
+         <xsl:choose>
+           <xsl:when test="no-tx-separate-pools">
+             <attribute name="NoTxSeparatePools">true</attribute>
+           </xsl:when>
+         </xsl:choose>
+        </mbean>
+      </depends>
+  </xsl:template>
+
+
+  <!-- template for ConnectionManager attributes shared among all ConnectionManagers.-->
+  <xsl:template name="cm-common">
+
+      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
+      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
+
+      <xsl:if test="security-domain|security-domain-and-application">
+        <attribute name="SecurityDomainJndiName"><xsl:value-of select="security-domain|security-domain-and-application"/></attribute>
+        <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
+      </xsl:if>
+
+  </xsl:template>
+
+  <!-- Datasource binding -->
+  <xsl:template name="ds-binding">
+    <xsl:param name="cm-name"></xsl:param>
+
+    <mbean code="org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService" 
+           name="jboss.jca:service=DataSourceBinding,name={jndi-name}" 
+           display-name="Binding for DataSource {jndi-name}">
+      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
+      <!--
+      <xsl:choose>
+         <xsl:when test="use-java-context">
+            <xsl:call-template name="use-java-context">
+               <xsl:with-param name="use-java"><xsl:value-of select="use-java-context"/></xsl:with-param>
+            </xsl:call-template>
+         </xsl:when>
+         <xsl:otherwise>
+            <attribute name="UseJavaContext">true</attribute>
+         </xsl:otherwise>
+       </xsl:choose>
+      -->
+      <xsl:choose>
+        <xsl:when test="use-java-context">
+          <attribute name="UseJavaContext"><xsl:value-of select="use-java-context"/></attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <attribute name="UseJavaContext">true</attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <depends optional-attribute-name="ConnectionManager">
+         <xsl:value-of select="$cm-name"/>,name=<xsl:value-of select="jndi-name"/>
+      </depends>
+      <xsl:choose>
+        <xsl:when test="jmx-invoker-name">
+          <depends optional-attribute-name="JMXInvokerName"><xsl:value-of select="jmx-invoker-name"/></depends>
+        </xsl:when>
+        <xsl:otherwise>
+          <depends optional-attribute-name="JMXInvokerName">jboss:service=invoker,type=jrmp</depends>
+        </xsl:otherwise>
+      </xsl:choose>
+    
+    </mbean>
+  </xsl:template>
+
+   <xsl:template name="use-java-context">
+      <xsl:param name="use-java" />
+      <attribute name="UseJavaContext"><xsl:value-of select="$use-java"/></attribute>
+      <!-- Only assign the JMXInvokerName attribute and dependency if use-java-context is false -->
+      <xsl:if test="$use-java = 'false'">
+         <xsl:choose>
+            <xsl:when test="jmx-invoker-name">
+               <depends optional-attribute-name="JMXInvokerName"><xsl:value-of select="jmx-invoker-name"/></depends>
+            </xsl:when>
+            <xsl:otherwise>
+               <depends optional-attribute-name="JMXInvokerName">jboss:service=invoker,type=jrmp</depends>
+            </xsl:otherwise>
+         </xsl:choose>
+      </xsl:if>
+   </xsl:template>
+
+  <!-- Connection factory binding -->
+  <xsl:template name="cf-binding">
+    <xsl:param name="cm-name"></xsl:param>
+
+    <mbean code="org.jboss.resource.connectionmanager.ConnectionFactoryBindingService" 
+           name="jboss.jca:service=DataSourceBinding,name={jndi-name}" 
+           display-name="Binding for ConnectionFactory {jndi-name}">
+      <attribute name="JndiName"><xsl:value-of select="jndi-name"/></attribute>
+      <xsl:choose>
+         <xsl:when test="use-java-context">
+            <attribute name="UseJavaContext"><xsl:value-of select="use-java-context"/></attribute>
+         </xsl:when>
+         <xsl:otherwise>
+            <attribute name="UseJavaContext">true</attribute>
+         </xsl:otherwise>
+       </xsl:choose>
+      <depends optional-attribute-name="ConnectionManager">
+         <xsl:value-of select="$cm-name"/>,name=<xsl:value-of select="jndi-name"/>
+      </depends>
+    </mbean>
+  </xsl:template>
+
+  <xsl:template name="tx-manager">
+      <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
+  </xsl:template>
+
+   <xsl:template name="type-mapping">
+      <xsl:param name="datasource"/>
+
+      <xsl:if test="$datasource/metadata or $datasource/type-mapping">
+         <xsl:element name="mbean">
+            <xsl:attribute name="code">org.jboss.ejb.plugins.cmp.jdbc.metadata.DataSourceMetaData</xsl:attribute>
+            <xsl:attribute name="name">
+               <xsl:text>jboss.jdbc:service=metadata,datasource=</xsl:text>
+               <xsl:value-of select="$datasource/jndi-name"/>
+            </xsl:attribute>
+
+            <xsl:element name="depends">
+               <xsl:attribute name="optional-attribute-name">MetadataLibrary</xsl:attribute>
+               <xsl:text>jboss.jdbc:service=metadata</xsl:text>
+            </xsl:element>
+
+            <xsl:if test="$datasource/type-mapping">
+               <xsl:element name="attribute">
+                  <xsl:attribute name="name">TypeMapping</xsl:attribute>
+                  <xsl:value-of select="$datasource/type-mapping"/>
+               </xsl:element>
+            </xsl:if>
+
+            <!-- DEPRECATED in favor of type-mapping -->
+            <xsl:if test="$datasource/metadata">
+               <xsl:element name="attribute">
+                  <xsl:attribute name="name">TypeMapping</xsl:attribute>
+                  <xsl:value-of select="$datasource/metadata/type-mapping"/>
+               </xsl:element>
+            </xsl:if>
+         </xsl:element>
+      </xsl:if>
+   </xsl:template>
+
+  <!-- template to copy any anonymous depends elements inside a cf/ds configuration element -->
+  <xsl:template match="depends" mode="anonymous">
+    <depends><xsl:value-of select="."/></depends>
+  </xsl:template>
+
+  <!-- template to copy all other elements literally, mbeans for instance-->
+  <xsl:template match="*|@*|text()">
+    <xsl:copy>
+      <xsl:apply-templates select="*|@*|text()"/>
+    </xsl:copy>
+  </xsl:template>
+
+   <!--
+      | new experimental ha stuff
+   -->
+
+   <xsl:template match="ha-local-tx-datasource">
+
+     <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager"
+            name="jboss.jca:service=LocalTxCM,name={jndi-name}"
+            display-name="ConnectionManager for DataSource {jndi-name}">
+
+       <attribute name="TrackConnectionByTx">true</attribute>
+       <attribute name="LocalTransactions">true</attribute>
+
+       <xsl:call-template name="pool">
+         <xsl:with-param name="mcf-template">ha-local-wrapper</xsl:with-param>
+       </xsl:call-template>
+       <xsl:call-template name="cm-common"/>
+       <xsl:call-template name="tx-manager"/>
+
+     </mbean>
+     <xsl:call-template name="ds-binding">
+        <xsl:with-param name="cm-name">jboss.jca:service=LocalTxCM</xsl:with-param>
+     </xsl:call-template>
+
+     <xsl:call-template name="type-mapping">
+        <xsl:with-param name="datasource" select="."/>
+     </xsl:call-template>
+   </xsl:template>
+
+   <!-- template to generate the ManagedConnectionFactory mbean for our jca-jdbc local wrapper -->
+   <xsl:template name="ha-local-wrapper">
+
+       <depends optional-attribute-name="ManagedConnectionFactoryName">
+       <!--embedded mbean-->
+         <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}" display-name="ManagedConnectionFactory for DataSource {jndi-name}">
+
+           <xsl:apply-templates select="depends" mode="anonymous"/>
+
+           <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-ha-local-jdbc.rar'</depends>
+           <attribute name="RARName"><xsl:value-of select="jboss-ha-local-jdbc.rar"/></attribute>
+           <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
+
+           <attribute name="ManagedConnectionFactoryProperties">
+             <properties>
+                <config-property name="ConnectionURL" type="java.lang.String"><xsl:value-of select="normalize-space(connection-url)"/></config-property>
+                <config-property name="DriverClass" type="java.lang.String"><xsl:value-of select="normalize-space(driver-class)"/></config-property>
+
+                <xsl:call-template name="wrapper-common-properties"/>
+                <xsl:if test="connection-property">
+                  <config-property name="ConnectionProperties" type="java.lang.String">
+                    <xsl:apply-templates select="connection-property"/>
+                  </config-property>
+                </xsl:if>
+
+             </properties>
+           </attribute>
+         </mbean>
+       </depends>
+   </xsl:template>
+
+   <xsl:template match="ha-xa-datasource">
+
+     <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager"
+            name="jboss.jca:service=XATxCM,name={jndi-name}"
+            display-name="ConnectionManager for DataSource {jndi-name}">
+
+       <xsl:choose>
+         <xsl:when test="track-connection-by-tx">
+           <attribute name="TrackConnectionByTx">true</attribute>
+           <attribute name="LocalTransactions">false</attribute>
+         </xsl:when>
+         <xsl:otherwise>
+           <attribute name="TrackConnectionByTx">false</attribute>
+           <attribute name="LocalTransactions">false</attribute>
+         </xsl:otherwise>
+       </xsl:choose>
+
+      <xsl:if test="xa-resource-timeout">
+         <attribute name="XAResourceTransactionTimeout"><xsl:value-of select="normalize-space(xa-resource-timeout)"/></attribute>
+      </xsl:if>
+
+       <xsl:call-template name="pool">
+         <xsl:with-param name="mcf-template">ha-xa-wrapper</xsl:with-param>
+       </xsl:call-template>
+       <xsl:call-template name="cm-common"/>
+       <xsl:call-template name="tx-manager"/>
+
+     </mbean>
+     <xsl:call-template name="ds-binding">
+        <xsl:with-param name="cm-name">jboss.jca:service=XATxCM</xsl:with-param>
+     </xsl:call-template>
+
+     <xsl:call-template name="type-mapping">
+        <xsl:with-param name="datasource" select="."/>
+     </xsl:call-template>
+   </xsl:template>
+
+   <xsl:template name="ha-xa-wrapper">
+      <depends optional-attribute-name="ManagedConnectionFactoryName">
+         <!--embedded mbean-->
+         <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
+               name="jboss.jca:service=ManagedConnectionFactory,name={jndi-name}"
+               displayname="ManagedConnectionFactory for DataSource {jndi-name}">
+
+           <xsl:apply-templates select="depends" mode="anonymous"/>
+
+           <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name='jboss-ha-xa-jdbc.rar'</depends>
+           <attribute name="RARName"><xsl:value-of select="jboss-ha-xa-jdbc.rar"/></attribute>
+           <attribute name="ConnectionDefinition">javax.sql.DataSource</attribute>
+
+           <attribute name="ManagedConnectionFactoryProperties">
+             <properties>
+               <config-property name="XADataSourceClass" type="java.lang.String"><xsl:value-of select="normalize-space(xa-datasource-class)"/></config-property>
+
+               <config-property name="XADataSourceProperties" type="java.lang.String">
+                 <xsl:apply-templates select="xa-datasource-property"/>
+               </config-property>
+
+               <xsl:if test="isSameRM-override-value">
+                 <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean"><xsl:value-of select="normalize-space(isSameRM-override-value)"/></config-property>
+               </xsl:if>
+
+                <xsl:if test="url-property">
+                  <config-property name="URLProperty" type="java.lang.String"><xsl:value-of select="normalize-space(url-property)"/></config-property>
+                </xsl:if>
+
+               <xsl:call-template name="wrapper-common-properties"/>
+
+             </properties>
+           </attribute>
+         </mbean>
+       </depends>
+   </xsl:template>
+
+</xsl:stylesheet>


Property changes on: trunk/embedded/src/main/resources/stylesheets/NoJRMPConnectionFactoryTemplate.xsl
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/main/resources/tomcat-jndi.properties
===================================================================
--- trunk/embedded/src/main/resources/tomcat-jndi.properties	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/main/resources/tomcat-jndi.properties	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,4 +1,4 @@
-# DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
-#
-java.naming.factory.initial=org.jboss.embedded.KernelInitializingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+# DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
+#
+java.naming.factory.initial=org.jboss.embedded.KernelInitializingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces


Property changes on: trunk/embedded/src/main/resources/tomcat-jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/BeanCompilerTester.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/BeanCompilerTester.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/BeanCompilerTester.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,116 +1,116 @@
-/*
- * 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.embedded.test;
-
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployer;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
-import org.jboss.embedded.BeanCompiler;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.ObjectOutputStream;
-import java.io.FileInputStream;
-import java.io.ObjectInputStream;
-import java.net.MalformedURLException;
-import java.lang.reflect.Field;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class BeanCompilerTester
-{
-   protected static Kernel createKernel()
-   {
-      BasicBootstrap bootstrap1 = new BasicBootstrap();
-      bootstrap1.run();
-      return bootstrap1.getKernel();
-   }
-
-   protected static void deploy(KernelDeployment deployment) throws Throwable 
-   {
-      AbstractKernelDeployer deployer = new AbstractKernelDeployer(createKernel());
-      deployer.deploy(deployment);
-      deployer.validate();
-
-   }
-
-   
-   public static void main(String[] args) throws Throwable
-   {
-      System.out.println("compiling: " + args[0]);
-      File fp = new File(args[0]);
-
-      KernelDeployment deployment = parse(fp);
-
-      long start = System.currentTimeMillis();
-
-      FileOutputStream fos = new FileOutputStream(args[0] +".bin");
-      ObjectOutputStream oos = new ObjectOutputStream(fos);
-      oos.writeObject(deployment);
-      oos.close();
-      fos.close();
-
-      FileInputStream fis = new FileInputStream(args[0] +".bin");
-      ObjectInputStream ois = new ObjectInputStream(fis);
-      KernelDeployment deployment2 = (KernelDeployment)ois.readObject();
-      ois.close();
-      fis.close();
-
-      long end = System.currentTimeMillis() - start;
-
-      System.out.println("object loading took: " + end);
-
-      System.out.println("deployment1");
-      deploy(deployment);
-      System.out.println("deployment2");
-      deploy(deployment2);
-
-
-
-   }
-
-   public static KernelDeployment parse(File fp)
-           throws JBossXBException, MalformedURLException
-   {
-      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
-      long start = System.currentTimeMillis();
-      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
-      Unmarshaller unmarshaller = factory.newUnmarshaller();
-      KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(fp.toURL().toString(), resolver);
-      long end = System.currentTimeMillis() - start;
-      System.out.println("XML parsing took: " + end);
-      return deployment;
-   }
-}
+/*
+ * 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.embedded.test;
+
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployer;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+import org.jboss.embedded.BeanCompiler;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+import java.io.FileInputStream;
+import java.io.ObjectInputStream;
+import java.net.MalformedURLException;
+import java.lang.reflect.Field;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class BeanCompilerTester
+{
+   protected static Kernel createKernel()
+   {
+      BasicBootstrap bootstrap1 = new BasicBootstrap();
+      bootstrap1.run();
+      return bootstrap1.getKernel();
+   }
+
+   protected static void deploy(KernelDeployment deployment) throws Throwable 
+   {
+      AbstractKernelDeployer deployer = new AbstractKernelDeployer(createKernel());
+      deployer.deploy(deployment);
+      deployer.validate();
+
+   }
+
+   
+   public static void main(String[] args) throws Throwable
+   {
+      System.out.println("compiling: " + args[0]);
+      File fp = new File(args[0]);
+
+      KernelDeployment deployment = parse(fp);
+
+      long start = System.currentTimeMillis();
+
+      FileOutputStream fos = new FileOutputStream(args[0] +".bin");
+      ObjectOutputStream oos = new ObjectOutputStream(fos);
+      oos.writeObject(deployment);
+      oos.close();
+      fos.close();
+
+      FileInputStream fis = new FileInputStream(args[0] +".bin");
+      ObjectInputStream ois = new ObjectInputStream(fis);
+      KernelDeployment deployment2 = (KernelDeployment)ois.readObject();
+      ois.close();
+      fis.close();
+
+      long end = System.currentTimeMillis() - start;
+
+      System.out.println("object loading took: " + end);
+
+      System.out.println("deployment1");
+      deploy(deployment);
+      System.out.println("deployment2");
+      deploy(deployment2);
+
+
+
+   }
+
+   public static KernelDeployment parse(File fp)
+           throws JBossXBException, MalformedURLException
+   {
+      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
+      long start = System.currentTimeMillis();
+      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
+      Unmarshaller unmarshaller = factory.newUnmarshaller();
+      KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(fp.toURL().toString(), resolver);
+      long end = System.currentTimeMillis() - start;
+      System.out.println("XML parsing took: " + end);
+      return deployment;
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/BeanCompilerTester.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/SimpleBean.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/SimpleBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/SimpleBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,63 +1,63 @@
-/*
- * 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.embedded.test;
-
-import org.jboss.kernel.Kernel;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class SimpleBean
-{
-   private SimpleBean ref;
-   private Kernel kernel;
-
-
-   public SimpleBean getRef()
-   {
-      return ref;
-   }
-
-   public void setRef(SimpleBean ref)
-   {
-      this.ref = ref;
-   }
-
-
-   public Kernel getKernel()
-   {
-      return kernel;
-   }
-
-   public void setKernel(Kernel kernel)
-   {
-      this.kernel = kernel;
-   }
-
-   public void start()
-   {
-      System.out.println("**************** STARTED");
-   }
-}
+/*
+ * 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.embedded.test;
+
+import org.jboss.kernel.Kernel;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class SimpleBean
+{
+   private SimpleBean ref;
+   private Kernel kernel;
+
+
+   public SimpleBean getRef()
+   {
+      return ref;
+   }
+
+   public void setRef(SimpleBean ref)
+   {
+      this.ref = ref;
+   }
+
+
+   public Kernel getKernel()
+   {
+      return kernel;
+   }
+
+   public void setKernel(Kernel kernel)
+   {
+      this.kernel = kernel;
+   }
+
+   public void start()
+   {
+      System.out.println("**************** STARTED");
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/SimpleBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBinaryBootstrap.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBinaryBootstrap.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBinaryBootstrap.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,51 +1,51 @@
-/*
- * 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.embedded.test;
-
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.BinaryBootstrap;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class TimedBinaryBootstrap
-{
-   public static void main(String[] args) throws Exception
-   {
-      long start = System.currentTimeMillis();
-      BinaryBootstrap.getInstance().bootstrap();
-      long bootEnd = System.currentTimeMillis();
-      long end = bootEnd - start;
-
-      System.out.println("Bootstrap took: " + end);
-
-     BinaryBootstrap.getInstance().shutdown();
-
-      long shutEnd = System.currentTimeMillis() - bootEnd;
-
-      System.out.println("shutdown took: " + shutEnd);
-
-   }
-}
+/*
+ * 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.embedded.test;
+
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.BinaryBootstrap;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class TimedBinaryBootstrap
+{
+   public static void main(String[] args) throws Exception
+   {
+      long start = System.currentTimeMillis();
+      BinaryBootstrap.getInstance().bootstrap();
+      long bootEnd = System.currentTimeMillis();
+      long end = bootEnd - start;
+
+      System.out.println("Bootstrap took: " + end);
+
+     BinaryBootstrap.getInstance().shutdown();
+
+      long shutEnd = System.currentTimeMillis() - bootEnd;
+
+      System.out.println("shutdown took: " + shutEnd);
+
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBinaryBootstrap.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBootstrap.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBootstrap.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBootstrap.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,50 +1,50 @@
-/*
- * 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.embedded.test;
-
-import org.jboss.embedded.Bootstrap;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public class TimedBootstrap
-{
-   public static void main(String[] args) throws Exception
-   {
-      long start = System.currentTimeMillis();
-      Bootstrap.getInstance().bootstrap();
-      long bootEnd = System.currentTimeMillis();
-      long end = bootEnd - start;
-
-      System.out.println("Bootstrap took: " + end);
-
-      Bootstrap.getInstance().shutdown();
-
-      long shutEnd = System.currentTimeMillis() - bootEnd;
-
-      System.out.println("shutdown took: " + shutEnd);
-
-   }
-}
+/*
+ * 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.embedded.test;
+
+import org.jboss.embedded.Bootstrap;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public class TimedBootstrap
+{
+   public static void main(String[] args) throws Exception
+   {
+      long start = System.currentTimeMillis();
+      Bootstrap.getInstance().bootstrap();
+      long bootEnd = System.currentTimeMillis();
+      long end = bootEnd - start;
+
+      System.out.println("Bootstrap took: " + end);
+
+      Bootstrap.getInstance().shutdown();
+
+      long shutEnd = System.currentTimeMillis() - bootEnd;
+
+      System.out.println("shutdown took: " + shutEnd);
+
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/TimedBootstrap.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/bootstrap/unit/BootstrapTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/bootstrap/unit/BootstrapTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/bootstrap/unit/BootstrapTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,127 +1,127 @@
-/*
- * 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.embedded.test.bootstrap.unit;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.adapters.JMXKernel;
-import org.jboss.deployers.spi.DeploymentException;
-
-import javax.naming.InitialContext;
-import javax.sql.DataSource;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.ReflectionException;
-import javax.management.MalformedObjectNameException;
-import java.sql.Connection;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class BootstrapTestCase extends TestCase
-{
-   public BootstrapTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-   public static Test suite() throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(BootstrapTestCase.class);
-
-
-      // setup test so that embedded JBoss is started/stopped once for all tests here.
-      TestSetup wrapper = new TestSetup(suite)
-      {
-         protected void setUp()
-         {
-            long start = System.currentTimeMillis();
-            try
-            {
-               startupEmbeddedJboss();
-            }
-            finally
-            {
-               System.out.println("Bootstrap took " + (System.currentTimeMillis() - start) + " (ms)");
-            }
-
-         }
-
-         protected void tearDown()
-         {
-            shutdownEmbeddedJboss();
-         }
-      };
-
-      return wrapper;
-   }
-
-   public static void startupEmbeddedJboss()
-   {
-      try
-      {
-         Bootstrap.getInstance().bootstrap();
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Failed to bootstrap", e);
-      }
-   }
-
-   public static void shutdownEmbeddedJboss()
-   {
-      Bootstrap.getInstance().shutdown();
-   }
-
-   public void testDefaultDS() throws Exception
-   {
-      outputJNDI();
-      InitialContext ctx = new InitialContext();
-      DataSource ds = (DataSource)ctx.lookup("java:/DefaultDS");
-      Connection conn = ds.getConnection();
-      conn.close();
-   }
-
-   private void outputJNDI()
-           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
-   {
-      MBeanServer server = getMBeanServer();
-      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
-      System.out.println(xml);
-   }
-
-   private static MBeanServer getMBeanServer()
-   {
-      JMXKernel jmxKernel = (JMXKernel)Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
-      MBeanServer server = jmxKernel.getMbeanServer();
-      return server;
-   }
-}
+/*
+ * 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.embedded.test.bootstrap.unit;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.adapters.JMXKernel;
+import org.jboss.deployers.spi.DeploymentException;
+
+import javax.naming.InitialContext;
+import javax.sql.DataSource;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.ReflectionException;
+import javax.management.MalformedObjectNameException;
+import java.sql.Connection;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class BootstrapTestCase extends TestCase
+{
+   public BootstrapTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+   public static Test suite() throws Exception
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(BootstrapTestCase.class);
+
+
+      // setup test so that embedded JBoss is started/stopped once for all tests here.
+      TestSetup wrapper = new TestSetup(suite)
+      {
+         protected void setUp()
+         {
+            long start = System.currentTimeMillis();
+            try
+            {
+               startupEmbeddedJboss();
+            }
+            finally
+            {
+               System.out.println("Bootstrap took " + (System.currentTimeMillis() - start) + " (ms)");
+            }
+
+         }
+
+         protected void tearDown()
+         {
+            shutdownEmbeddedJboss();
+         }
+      };
+
+      return wrapper;
+   }
+
+   public static void startupEmbeddedJboss()
+   {
+      try
+      {
+         Bootstrap.getInstance().bootstrap();
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Failed to bootstrap", e);
+      }
+   }
+
+   public static void shutdownEmbeddedJboss()
+   {
+      Bootstrap.getInstance().shutdown();
+   }
+
+   public void testDefaultDS() throws Exception
+   {
+      outputJNDI();
+      InitialContext ctx = new InitialContext();
+      DataSource ds = (DataSource)ctx.lookup("java:/DefaultDS");
+      Connection conn = ds.getConnection();
+      conn.close();
+   }
+
+   private void outputJNDI()
+           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
+   {
+      MBeanServer server = getMBeanServer();
+      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
+      System.out.println(xml);
+   }
+
+   private static MBeanServer getMBeanServer()
+   {
+      JMXKernel jmxKernel = (JMXKernel)Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
+      MBeanServer server = jmxKernel.getMbeanServer();
+      return server;
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/bootstrap/unit/BootstrapTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Customer.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Customer.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Customer.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,48 +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.embedded.test.ejb;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
- at Entity
-public class Customer
-{
-   private String name;
-
-   @Id
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-}
+/*
+ * 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.embedded.test.ejb;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+ at Entity
+public class Customer
+{
+   private String name;
+
+   @Id
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Customer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAO.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAO.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAO.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,37 +1,37 @@
-/*
- * 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.embedded.test.ejb;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public interface DAO
-{
-   Customer createCustomer(String name)
-           ;
-
-   Customer findCustomer(String name)
-           ;
-}
+/*
+ * 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.embedded.test.ejb;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface DAO
+{
+   Customer createCustomer(String name)
+           ;
+
+   Customer findCustomer(String name)
+           ;
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAO.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAOBean.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAOBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAOBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,53 +1,53 @@
-/*
- * 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.embedded.test.ejb;
-
-import javax.ejb.Stateless;
-import javax.persistence.PersistenceContext;
-import javax.persistence.EntityManager;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
- at Stateless
-public class DAOBean implements DAO
-{
-   @PersistenceContext
-   EntityManager manager;
-
-   public Customer createCustomer(String name)
-   {
-      Customer cust = new Customer();
-      cust.setName(name);
-      manager.persist(cust);
-      return cust;
-   }
-
-   public Customer findCustomer(String name)
-   {
-      return manager.find(Customer.class, name);
-   }
-
-}
+/*
+ * 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.embedded.test.ejb;
+
+import javax.ejb.Stateless;
+import javax.persistence.PersistenceContext;
+import javax.persistence.EntityManager;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless
+public class DAOBean implements DAO
+{
+   @PersistenceContext
+   EntityManager manager;
+
+   public Customer createCustomer(String name)
+   {
+      Customer cust = new Customer();
+      cust.setName(name);
+      manager.persist(cust);
+      return cust;
+   }
+
+   public Customer findCustomer(String name)
+   {
+      return manager.find(Customer.class, name);
+   }
+
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/DAOBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,39 +1,39 @@
-/*
- * 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.embedded.test.ejb;
-
-import javax.annotation.security.RolesAllowed;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public interface Secured
-{
-   @RolesAllowed("Allowed")
-   void allowed();
-
-   @RolesAllowed("Nobody")
-   void nobody();
-}
+/*
+ * 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.embedded.test.ejb;
+
+import javax.annotation.security.RolesAllowed;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface Secured
+{
+   @RolesAllowed("Allowed")
+   void allowed();
+
+   @RolesAllowed("Nobody")
+   void nobody();
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/Secured.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,50 +1,50 @@
-/*
- * 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.embedded.test.ejb;
-
-import javax.annotation.security.RolesAllowed;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.SecurityDomain;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
- at SecurityDomain("other")
- at Stateless
-public class SecuredBean implements Secured
-{
-   @RolesAllowed("allowed")
-   public void allowed()
-   {
-
-   }
-
-   @RolesAllowed("nobody")
-   public void nobody()
-   {
-
-   }
-}
+/*
+ * 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.embedded.test.ejb;
+
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.annotation.SecurityDomain;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+ at SecurityDomain("other")
+ at Stateless
+public class SecuredBean implements Secured
+{
+   @RolesAllowed("allowed")
+   public void allowed()
+   {
+
+   }
+
+   @RolesAllowed("nobody")
+   public void nobody()
+   {
+
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/SecuredBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbJBossTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbJBossTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbJBossTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,84 +1,84 @@
-/*
- * 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.embedded.test.ejb.unit;
-
-import junit.framework.Test;
-import org.jboss.embedded.junit.EmbeddedTestCase;
-import org.jboss.embedded.test.ejb.Customer;
-import org.jboss.embedded.test.ejb.DAO;
-import org.jboss.test.JBossTestCase;
-
-import javax.naming.InitialContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class EjbJBossTestCase extends JBossTestCase
-{
-   public EjbJBossTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-   /*
-   private static void outputJNDI()
-           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
-   {
-      MBeanServer server = getMBeanServer();
-      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
-      System.out.println(xml);
-   }
-
-   private static MBeanServer getMBeanServer()
-   {
-      JMXKernel jmxKernel = (JMXKernel) bootstrap.getKernel().getRegistry().getEntry("JMXKernel").getTarget();
-      MBeanServer server = jmxKernel.getMbeanServer();
-      return server;
-   }
-   */
-
-
-   public void testSimpleEjb() throws Exception
-   {
-      InitialContext ctx = getInitialContext();
-      DAO dao = (DAO)ctx.lookup("DAOBean/local");
-      Customer cust = dao.createCustomer("Bill");
-      cust = dao.findCustomer("Bill");
-      assertNotNull(cust);
-      assertEquals(cust.getName(), "Bill");
-   }
-
-   public void testDummy()
-   {
-      
-   }
-
-   public static Test suite() throws Exception
-   {
-      return EmbeddedTestCase.getAdaptedSetup(EjbJBossTestCase.class, "ejb-test.jar");
-   }
-
-
+/*
+ * 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.embedded.test.ejb.unit;
+
+import junit.framework.Test;
+import org.jboss.embedded.junit.EmbeddedTestCase;
+import org.jboss.embedded.test.ejb.Customer;
+import org.jboss.embedded.test.ejb.DAO;
+import org.jboss.test.JBossTestCase;
+
+import javax.naming.InitialContext;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class EjbJBossTestCase extends JBossTestCase
+{
+   public EjbJBossTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+   /*
+   private static void outputJNDI()
+           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
+   {
+      MBeanServer server = getMBeanServer();
+      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
+      System.out.println(xml);
+   }
+
+   private static MBeanServer getMBeanServer()
+   {
+      JMXKernel jmxKernel = (JMXKernel) bootstrap.getKernel().getRegistry().getEntry("JMXKernel").getTarget();
+      MBeanServer server = jmxKernel.getMbeanServer();
+      return server;
+   }
+   */
+
+
+   public void testSimpleEjb() throws Exception
+   {
+      InitialContext ctx = getInitialContext();
+      DAO dao = (DAO)ctx.lookup("DAOBean/local");
+      Customer cust = dao.createCustomer("Bill");
+      cust = dao.findCustomer("Bill");
+      assertNotNull(cust);
+      assertEquals(cust.getName(), "Bill");
+   }
+
+   public void testDummy()
+   {
+      
+   }
+
+   public static Test suite() throws Exception
+   {
+      return EmbeddedTestCase.getAdaptedSetup(EjbJBossTestCase.class, "ejb-test.jar");
+   }
+
+
 }
\ No newline at end of file


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbJBossTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,205 +1,205 @@
-/*
- * 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.embedded.test.ejb.unit;
-
-import junit.framework.TestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.extensions.TestSetup;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.adapters.JMXKernel;
-import org.jboss.embedded.DeploymentGroup;
-import org.jboss.embedded.test.ejb.DAO;
-import org.jboss.embedded.test.ejb.Customer;
-import org.jboss.embedded.test.ejb.Secured;
-import org.jboss.deployers.spi.DeploymentException;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.ReflectionException;
-import javax.management.MalformedObjectNameException;
-import javax.naming.InitialContext;
-import javax.naming.Context;
-import javax.ejb.EJBAccessException;
-import java.util.Hashtable;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class    EjbTestCase extends TestCase
-{
-   public EjbTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-   public static Test suite() throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(EjbTestCase.class);
-
-
-      // setup test so that embedded JBoss is started/stopped once for all tests here.
-      TestSetup wrapper = new TestSetup(suite)
-      {
-         protected void setUp()
-         {
-            long start = System.currentTimeMillis();
-            try
-            {
-               startupEmbeddedJboss();
-            }
-            finally
-            {
-               System.out.println("Bootstrap took " + (System.currentTimeMillis() - start) + " (ms)");
-            }
-
-         }
-
-         protected void tearDown()
-         {
-            shutdownEmbeddedJboss();
-         }
-      };
-
-      return wrapper;
-   }
-
-   public static void startupEmbeddedJboss()
-   {
-      try
-      {
-         Bootstrap.getInstance().bootstrap();
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Failed to bootstrap", e);
-      }
-   }
-
-   public static void shutdownEmbeddedJboss()
-   {
-      Bootstrap.getInstance().shutdown();
-   }
-
-   private static void outputJNDI()
-           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
-      {
-      MBeanServer server = getMBeanServer();
-      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
-      System.out.println(xml);
-   }
-
-   private static MBeanServer getMBeanServer()
-   {
-      JMXKernel jmxKernel = (JMXKernel)Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
-      MBeanServer server = jmxKernel.getMbeanServer();
-      return server;
-   }
-
-
-   public void testSimpleEjb() throws Exception
-   {
-      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-      group.addClasspath("ejb-test.jar");
-      group.process();
-
-      outputJNDI();
-      InitialContext ctx = new InitialContext();
-      DAO dao = (DAO)ctx.lookup("DAOBean/local");
-      Customer cust = dao.createCustomer("Bill");
-      cust = dao.findCustomer("Bill");
-      assert cust != null;
-      assert cust.getName().equals("Bill");
-
-      group.undeploy();
-
-
-   }
-
-    public void testSimpleEjb2() throws Exception
-    {
-       DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-       group.addClasspath("ejb-test.jar");
-       group.process();
-
-       outputJNDI();
-       InitialContext ctx = new InitialContext();
-       DAO dao = (DAO)ctx.lookup("DAOBean/local");
-       Customer cust = dao.createCustomer("Bill");
-       cust = dao.findCustomer("Bill");
-       assert cust != null;
-       assert cust.getName().equals("Bill");
-
-       group.undeploy();
-
-
-    }
-
-   public void testSecurity() throws Exception
-   {
-      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-      group.addClasspath("ejb-test.jar");
-      group.process();
-
-      Hashtable env = new Hashtable();
-      env.put(Context.SECURITY_PRINCIPAL, "scott");
-      env.put(Context.SECURITY_CREDENTIALS, "invalidpassword");
-
-      InitialContext ctx = new InitialContext(env);
-      Secured secured = (Secured)ctx.lookup("SecuredBean/local");
-      boolean exceptionThrown = false;
-      try
-      {
-         secured.allowed();
-      }
-      catch (EJBAccessException ignored)
-      {
-         exceptionThrown = true;
-      }
-      assertTrue("Security exception not thrown for invalid password", exceptionThrown);
-      env.put(Context.SECURITY_CREDENTIALS, "password");
-      ctx = new InitialContext(env);
-
-      secured.allowed();
-
-      exceptionThrown = false;
-      try
-      {
-         secured.nobody();
-      }
-      catch (EJBAccessException ignored)
-      {
-         exceptionThrown = true;
-      }
-      assertTrue("Security exception not thrown for invalid role", exceptionThrown);
-
-      group.undeploy();
-
-
-   }
-}
+/*
+ * 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.embedded.test.ejb.unit;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.extensions.TestSetup;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.adapters.JMXKernel;
+import org.jboss.embedded.DeploymentGroup;
+import org.jboss.embedded.test.ejb.DAO;
+import org.jboss.embedded.test.ejb.Customer;
+import org.jboss.embedded.test.ejb.Secured;
+import org.jboss.deployers.spi.DeploymentException;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.ReflectionException;
+import javax.management.MalformedObjectNameException;
+import javax.naming.InitialContext;
+import javax.naming.Context;
+import javax.ejb.EJBAccessException;
+import java.util.Hashtable;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class    EjbTestCase extends TestCase
+{
+   public EjbTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+   public static Test suite() throws Exception
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(EjbTestCase.class);
+
+
+      // setup test so that embedded JBoss is started/stopped once for all tests here.
+      TestSetup wrapper = new TestSetup(suite)
+      {
+         protected void setUp()
+         {
+            long start = System.currentTimeMillis();
+            try
+            {
+               startupEmbeddedJboss();
+            }
+            finally
+            {
+               System.out.println("Bootstrap took " + (System.currentTimeMillis() - start) + " (ms)");
+            }
+
+         }
+
+         protected void tearDown()
+         {
+            shutdownEmbeddedJboss();
+         }
+      };
+
+      return wrapper;
+   }
+
+   public static void startupEmbeddedJboss()
+   {
+      try
+      {
+         Bootstrap.getInstance().bootstrap();
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Failed to bootstrap", e);
+      }
+   }
+
+   public static void shutdownEmbeddedJboss()
+   {
+      Bootstrap.getInstance().shutdown();
+   }
+
+   private static void outputJNDI()
+           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
+      {
+      MBeanServer server = getMBeanServer();
+      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
+      System.out.println(xml);
+   }
+
+   private static MBeanServer getMBeanServer()
+   {
+      JMXKernel jmxKernel = (JMXKernel)Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
+      MBeanServer server = jmxKernel.getMbeanServer();
+      return server;
+   }
+
+
+   public void testSimpleEjb() throws Exception
+   {
+      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+      group.addClasspath("ejb-test.jar");
+      group.process();
+
+      outputJNDI();
+      InitialContext ctx = new InitialContext();
+      DAO dao = (DAO)ctx.lookup("DAOBean/local");
+      Customer cust = dao.createCustomer("Bill");
+      cust = dao.findCustomer("Bill");
+      assert cust != null;
+      assert cust.getName().equals("Bill");
+
+      group.undeploy();
+
+
+   }
+
+    public void testSimpleEjb2() throws Exception
+    {
+       DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+       group.addClasspath("ejb-test.jar");
+       group.process();
+
+       outputJNDI();
+       InitialContext ctx = new InitialContext();
+       DAO dao = (DAO)ctx.lookup("DAOBean/local");
+       Customer cust = dao.createCustomer("Bill");
+       cust = dao.findCustomer("Bill");
+       assert cust != null;
+       assert cust.getName().equals("Bill");
+
+       group.undeploy();
+
+
+    }
+
+   public void testSecurity() throws Exception
+   {
+      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+      group.addClasspath("ejb-test.jar");
+      group.process();
+
+      Hashtable env = new Hashtable();
+      env.put(Context.SECURITY_PRINCIPAL, "scott");
+      env.put(Context.SECURITY_CREDENTIALS, "invalidpassword");
+
+      InitialContext ctx = new InitialContext(env);
+      Secured secured = (Secured)ctx.lookup("SecuredBean/local");
+      boolean exceptionThrown = false;
+      try
+      {
+         secured.allowed();
+      }
+      catch (EJBAccessException ignored)
+      {
+         exceptionThrown = true;
+      }
+      assertTrue("Security exception not thrown for invalid password", exceptionThrown);
+      env.put(Context.SECURITY_CREDENTIALS, "password");
+      ctx = new InitialContext(env);
+
+      secured.allowed();
+
+      exceptionThrown = false;
+      try
+      {
+         secured.nobody();
+      }
+      catch (EJBAccessException ignored)
+      {
+         exceptionThrown = true;
+      }
+      assertTrue("Security exception not thrown for invalid role", exceptionThrown);
+
+      group.undeploy();
+
+
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.jsp
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.jsp	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.jsp	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,28 +1,28 @@
-<%@ page import="javax.naming.InitialContext" %>
-<%@ page import="org.jboss.embedded.test.ejb.DAO" %>
-<%@ page import="org.jboss.embedded.test.ejb.Customer" %>
-<%@ page import="javax.naming.NamingException" %>
-
-<%
-   Customer cust = null;
-   try
-   {
-      InitialContext ctx = new InitialContext();
-      DAO dao = (DAO) ctx.lookup("DAOBean/local");
-      cust = dao.createCustomer("Bill");
-      cust = dao.findCustomer("Bill");
-   }
-   catch (NamingException e)
-   {
-      throw new RuntimeException(e);
-   }
-   assert cust != null;
-   assert cust.getName().equals("Bill");
-
-%>
-
-<html>
-<body>
-<h1>SUCCESS</h1>
-</body>
-</html>
+<%@ page import="javax.naming.InitialContext" %>
+<%@ page import="org.jboss.embedded.test.ejb.DAO" %>
+<%@ page import="org.jboss.embedded.test.ejb.Customer" %>
+<%@ page import="javax.naming.NamingException" %>
+
+<%
+   Customer cust = null;
+   try
+   {
+      InitialContext ctx = new InitialContext();
+      DAO dao = (DAO) ctx.lookup("DAOBean/local");
+      cust = dao.createCustomer("Bill");
+      cust = dao.findCustomer("Bill");
+   }
+   catch (NamingException e)
+   {
+      throw new RuntimeException(e);
+   }
+   assert cust != null;
+   assert cust.getName().equals("Bill");
+
+%>
+
+<html>
+<body>
+<h1>SUCCESS</h1>
+</body>
+</html>


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/ejb/unit/EjbTestCase.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/EjbTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/EjbTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/EjbTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,140 +1,140 @@
-/*
- * 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.embedded.test.idetesting;
-
-import junit.framework.TestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.extensions.TestSetup;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.DeploymentGroup;
-import org.jboss.embedded.test.ejb.DAO;
-import org.jboss.embedded.test.ejb.Customer;
-import org.jboss.embedded.adapters.JMXKernel;
-import org.jboss.deployers.spi.DeploymentException;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.ReflectionException;
-import javax.management.MalformedObjectNameException;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class EjbTestCase extends TestCase
-{
-   public EjbTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-   public static Test suite() throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(EjbTestCase.class);
-
-
-      // setup test so that embedded JBoss is started/stopped once for all tests here.
-      TestSetup wrapper = new TestSetup(suite)
-      {
-         protected void setUp()
-         {
-            if (Bootstrap.getInstance().isStarted()) return;
-
-            try
-            {
-               Bootstrap.getInstance().bootstrap();
-            }
-            catch (Exception error)
-            {
-               throw new RuntimeException("Failed to bootstrap", error);
-            }
-         }
-
-         protected void tearDown()
-         {
-         }
-      };
-
-      return wrapper;
-   }
-
-   private static void outputJNDI()
-           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
-   {
-      MBeanServer server = getMBeanServer();
-      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
-      System.out.println(xml);
-   }
-
-   private static MBeanServer getMBeanServer()
-   {
-      JMXKernel jmxKernel = (JMXKernel)Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
-      MBeanServer server = jmxKernel.getMbeanServer();
-      return server;
-   }
-
-
-   public void testSimpleEjb() throws Exception
-   {
-      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-      group.addClasspath("ejb-test.jar");
-      group.process();
-
-      outputJNDI();
-      InitialContext ctx = new InitialContext();
-      DAO dao = (DAO)ctx.lookup("DAOBean/local");
-      Customer cust = dao.createCustomer("Bill");
-      cust = dao.findCustomer("Bill");
-      assert cust != null;
-      assert cust.getName().equals("Bill");
-
-      group.undeploy();
-
-
-   }
-
-    public void testSimpleEjb2() throws Exception
-    {
-       DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-       group.addClasspath("ejb-test.jar");
-       group.process();
-
-       outputJNDI();
-       InitialContext ctx = new InitialContext();
-       DAO dao = (DAO)ctx.lookup("DAOBean/local");
-       Customer cust = dao.createCustomer("Bill");
-       cust = dao.findCustomer("Bill");
-       assert cust != null;
-       assert cust.getName().equals("Bill");
-
-       group.undeploy();
-
-
-    }
-}
+/*
+ * 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.embedded.test.idetesting;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.extensions.TestSetup;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.DeploymentGroup;
+import org.jboss.embedded.test.ejb.DAO;
+import org.jboss.embedded.test.ejb.Customer;
+import org.jboss.embedded.adapters.JMXKernel;
+import org.jboss.deployers.spi.DeploymentException;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.ReflectionException;
+import javax.management.MalformedObjectNameException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class EjbTestCase extends TestCase
+{
+   public EjbTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+   public static Test suite() throws Exception
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(EjbTestCase.class);
+
+
+      // setup test so that embedded JBoss is started/stopped once for all tests here.
+      TestSetup wrapper = new TestSetup(suite)
+      {
+         protected void setUp()
+         {
+            if (Bootstrap.getInstance().isStarted()) return;
+
+            try
+            {
+               Bootstrap.getInstance().bootstrap();
+            }
+            catch (Exception error)
+            {
+               throw new RuntimeException("Failed to bootstrap", error);
+            }
+         }
+
+         protected void tearDown()
+         {
+         }
+      };
+
+      return wrapper;
+   }
+
+   private static void outputJNDI()
+           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
+   {
+      MBeanServer server = getMBeanServer();
+      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
+      System.out.println(xml);
+   }
+
+   private static MBeanServer getMBeanServer()
+   {
+      JMXKernel jmxKernel = (JMXKernel)Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
+      MBeanServer server = jmxKernel.getMbeanServer();
+      return server;
+   }
+
+
+   public void testSimpleEjb() throws Exception
+   {
+      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+      group.addClasspath("ejb-test.jar");
+      group.process();
+
+      outputJNDI();
+      InitialContext ctx = new InitialContext();
+      DAO dao = (DAO)ctx.lookup("DAOBean/local");
+      Customer cust = dao.createCustomer("Bill");
+      cust = dao.findCustomer("Bill");
+      assert cust != null;
+      assert cust.getName().equals("Bill");
+
+      group.undeploy();
+
+
+   }
+
+    public void testSimpleEjb2() throws Exception
+    {
+       DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+       group.addClasspath("ejb-test.jar");
+       group.process();
+
+       outputJNDI();
+       InitialContext ctx = new InitialContext();
+       DAO dao = (DAO)ctx.lookup("DAOBean/local");
+       Customer cust = dao.createCustomer("Bill");
+       cust = dao.findCustomer("Bill");
+       assert cust != null;
+       assert cust.getName().equals("Bill");
+
+       group.undeploy();
+
+
+    }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/EjbTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/MdbTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/MdbTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/MdbTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,86 +1,86 @@
-/*
- * 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.embedded.test.idetesting;
-
-import junit.framework.TestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.extensions.TestSetup;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.DeploymentGroup;
-import org.jboss.embedded.junit.EmbeddedTestSetup;
-import org.jboss.embedded.test.mdb.ExampleMDB;
-import org.jboss.deployers.spi.DeploymentException;
-
-import javax.naming.NamingException;
-import javax.naming.InitialContext;
-import javax.jms.JMSException;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.Connection;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.MessageProducer;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class MdbTestCase extends TestCase
-{
-   public MdbTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-   public static Test suite() throws Exception
-   {
-      return EmbeddedTestSetup.deployClasspath(MdbTestCase.class, "mdb-test.jar");
-   }
-
-   public void testSimpleEjb() throws Exception
-   {
-      sendMessage();
-   }
-
-   private static void sendMessage()
-           throws DeploymentException, NamingException, JMSException, InterruptedException
-   {
-      ExampleMDB.executed = false;
-
-      InitialContext ctx = new InitialContext();
-      ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
-      Destination destination = (Destination) ctx.lookup("queue/example");
-      assertNotNull(destination);
-      Connection conn = factory.createConnection();
-      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      TextMessage message = session.createTextMessage("hello");
-      MessageProducer producer = session.createProducer(destination);
-      producer.send(message);
-      session.close();
-      conn.close();
-      Thread.sleep(1000);
-   }
-
-}
+/*
+ * 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.embedded.test.idetesting;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.extensions.TestSetup;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.DeploymentGroup;
+import org.jboss.embedded.junit.EmbeddedTestSetup;
+import org.jboss.embedded.test.mdb.ExampleMDB;
+import org.jboss.deployers.spi.DeploymentException;
+
+import javax.naming.NamingException;
+import javax.naming.InitialContext;
+import javax.jms.JMSException;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.Connection;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.MessageProducer;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class MdbTestCase extends TestCase
+{
+   public MdbTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+   public static Test suite() throws Exception
+   {
+      return EmbeddedTestSetup.deployClasspath(MdbTestCase.class, "mdb-test.jar");
+   }
+
+   public void testSimpleEjb() throws Exception
+   {
+      sendMessage();
+   }
+
+   private static void sendMessage()
+           throws DeploymentException, NamingException, JMSException, InterruptedException
+   {
+      ExampleMDB.executed = false;
+
+      InitialContext ctx = new InitialContext();
+      ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
+      Destination destination = (Destination) ctx.lookup("queue/example");
+      assertNotNull(destination);
+      Connection conn = factory.createConnection();
+      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+      TextMessage message = session.createTextMessage("hello");
+      MessageProducer producer = session.createProducer(destination);
+      producer.send(message);
+      session.close();
+      conn.close();
+      Thread.sleep(1000);
+   }
+
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/MdbTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/VfsTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/VfsTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/VfsTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,88 +1,88 @@
-/*
- * 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.embedded.test.idetesting;
-
-import junit.framework.TestCase;
-import org.jboss.embedded.junit.EmbeddedTestSetup;
-import org.jboss.embedded.test.vfs.HelloWorld;
-import org.jboss.embedded.test.vfs.HelloWorldBean;
-import org.jboss.embedded.test.vfs.DAO;
-import org.jboss.embedded.test.vfs.Customer;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.virtual.AssembledDirectory;
-import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
-
-import javax.naming.InitialContext;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class VfsTestCase extends TestCase
-{
-   public VfsTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-
-   @Override
-   protected void setUp() throws Exception
-   {
-      EmbeddedTestSetup.testSetup();
-   }
-
-
-   @Override
-   protected void tearDown() throws Exception
-   {
-      EmbeddedTestSetup.testTearDown();
-   }
-
-   public void testEJB() throws Exception
-   {
-      AssembledDirectory jar = AssembledContextFactory.getInstance().create("vfs-test.jar");
-      jar.addClass(HelloWorld.class);
-      jar.addClass(HelloWorldBean.class);
-
-      Bootstrap.getInstance().deploy(jar);
-      HelloWorld hello = (HelloWorld)new InitialContext().lookup("HelloWorldBean/local");
-      hello.hello();
-      Bootstrap.getInstance().undeploy(jar);
-   }
-
-   public void testVfs() throws Exception
-   {
-      AssembledDirectory jar = AssembledContextFactory.getInstance().create("vfs-test2.jar");
-      String[] includes = {"org/jboss/embedded/test/vfs/*.class"};
-      jar.addResources(DAO.class, includes, null);
-      jar.mkdir("META-INF").addResource("vfs-test-persistence.xml", "persistence.xml");
-      Bootstrap.getInstance().deploy(jar);
-      DAO dao = (DAO)new InitialContext().lookup("DAOBean/local");
-      dao.create("Bill");
-      Customer cust = dao.find("Bill");
-      assertNotNull(cust);
-
-   }
-}
+/*
+ * 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.embedded.test.idetesting;
+
+import junit.framework.TestCase;
+import org.jboss.embedded.junit.EmbeddedTestSetup;
+import org.jboss.embedded.test.vfs.HelloWorld;
+import org.jboss.embedded.test.vfs.HelloWorldBean;
+import org.jboss.embedded.test.vfs.DAO;
+import org.jboss.embedded.test.vfs.Customer;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.virtual.AssembledDirectory;
+import org.jboss.virtual.plugins.context.vfs.AssembledContextFactory;
+
+import javax.naming.InitialContext;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class VfsTestCase extends TestCase
+{
+   public VfsTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      EmbeddedTestSetup.testSetup();
+   }
+
+
+   @Override
+   protected void tearDown() throws Exception
+   {
+      EmbeddedTestSetup.testTearDown();
+   }
+
+   public void testEJB() throws Exception
+   {
+      AssembledDirectory jar = AssembledContextFactory.getInstance().create("vfs-test.jar");
+      jar.addClass(HelloWorld.class);
+      jar.addClass(HelloWorldBean.class);
+
+      Bootstrap.getInstance().deploy(jar);
+      HelloWorld hello = (HelloWorld)new InitialContext().lookup("HelloWorldBean/local");
+      hello.hello();
+      Bootstrap.getInstance().undeploy(jar);
+   }
+
+   public void testVfs() throws Exception
+   {
+      AssembledDirectory jar = AssembledContextFactory.getInstance().create("vfs-test2.jar");
+      String[] includes = {"org/jboss/embedded/test/vfs/*.class"};
+      jar.addResources(DAO.class, includes, null);
+      jar.mkdir("META-INF").addResource("vfs-test-persistence.xml", "persistence.xml");
+      Bootstrap.getInstance().deploy(jar);
+      DAO dao = (DAO)new InitialContext().lookup("DAOBean/local");
+      dao.create("Bill");
+      Customer cust = dao.find("Bill");
+      assertNotNull(cust);
+
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/idetesting/VfsTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/jndibootstrap/unit/BootstrapTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/jndibootstrap/unit/BootstrapTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/jndibootstrap/unit/BootstrapTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,93 +1,93 @@
-/*
- * 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.embedded.test.jndibootstrap.unit;
-
-import junit.framework.TestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.adapters.JMXKernel;
-import org.jboss.embedded.jndi.KernelInitializingContextFactory;
-
-import javax.naming.InitialContext;
-import javax.naming.Context;
-import javax.sql.DataSource;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.ReflectionException;
-import javax.management.MalformedObjectNameException;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import java.sql.Connection;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class BootstrapTestCase extends TestCase
-{
-   public BootstrapTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-   public static Test suite() throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(BootstrapTestCase.class);
-
-      return suite;
-   }
-
-   public void testDefaultDS() throws Exception
-   {
-      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, KernelInitializingContextFactory.class.getName());
-      System.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
-      InitialContext ctx = new InitialContext();
-      outputJNDI();
-      DataSource ds = (DataSource)ctx.lookup("java:/DefaultDS");
-      Connection conn = ds.getConnection();
-      conn.close();
-   }
-
-   public void testTwo() throws Exception
-   {
-      assert KernelInitializingContextFactory.initialized == true;
-   }
-
-   private void outputJNDI()
-           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
-   {
-      MBeanServer server = getMBeanServer();
-      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
-      System.out.println(xml);
-   }
-
-   private static MBeanServer getMBeanServer()
-   {
-      JMXKernel jmxKernel = (JMXKernel) Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
-      MBeanServer server = jmxKernel.getMbeanServer();
-      return server;
-   }
-}
+/*
+ * 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.embedded.test.jndibootstrap.unit;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.adapters.JMXKernel;
+import org.jboss.embedded.jndi.KernelInitializingContextFactory;
+
+import javax.naming.InitialContext;
+import javax.naming.Context;
+import javax.sql.DataSource;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.ReflectionException;
+import javax.management.MalformedObjectNameException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import java.sql.Connection;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class BootstrapTestCase extends TestCase
+{
+   public BootstrapTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+   public static Test suite() throws Exception
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(BootstrapTestCase.class);
+
+      return suite;
+   }
+
+   public void testDefaultDS() throws Exception
+   {
+      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, KernelInitializingContextFactory.class.getName());
+      System.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
+      InitialContext ctx = new InitialContext();
+      outputJNDI();
+      DataSource ds = (DataSource)ctx.lookup("java:/DefaultDS");
+      Connection conn = ds.getConnection();
+      conn.close();
+   }
+
+   public void testTwo() throws Exception
+   {
+      assert KernelInitializingContextFactory.initialized == true;
+   }
+
+   private void outputJNDI()
+           throws InstanceNotFoundException, MBeanException, ReflectionException, MalformedObjectNameException
+   {
+      MBeanServer server = getMBeanServer();
+      String xml = (String)server.invoke(new ObjectName("jboss:service=JNDIView"), "listXML", null, null);
+      System.out.println(xml);
+   }
+
+   private static MBeanServer getMBeanServer()
+   {
+      JMXKernel jmxKernel = (JMXKernel) Bootstrap.getInstance().getKernel().getRegistry().getEntry("JMXKernel").getTarget();
+      MBeanServer server = jmxKernel.getMbeanServer();
+      return server;
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/jndibootstrap/unit/BootstrapTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/ExampleMDB.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/ExampleMDB.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/ExampleMDB.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,49 +1,49 @@
-/*
- * 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.embedded.test.mdb;
-
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-
-import org.jboss.ejb3.annotation.Depends;
-
- at MessageDriven(activationConfig =
-        {
-        @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
-        @ActivationConfigProperty(propertyName="destination", propertyValue="queue/example")
-        })
- at Depends("jboss.mq.destination:name=example,service=Queue")
-public class ExampleMDB implements MessageListener
-{
-   public static boolean executed = false;
-
-   public void onMessage(Message recvMsg)
-   {
-      System.out.println("----------------");
-      System.out.println("Received message");
-      executed = true;
-      System.out.println("----------------");
-   }
-
-}
+/*
+ * 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.embedded.test.mdb;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+
+import org.jboss.ejb3.annotation.Depends;
+
+ at MessageDriven(activationConfig =
+        {
+        @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
+        @ActivationConfigProperty(propertyName="destination", propertyValue="queue/example")
+        })
+ at Depends("jboss.mq.destination:name=example,service=Queue")
+public class ExampleMDB implements MessageListener
+{
+   public static boolean executed = false;
+
+   public void onMessage(Message recvMsg)
+   {
+      System.out.println("----------------");
+      System.out.println("Received message");
+      executed = true;
+      System.out.println("----------------");
+   }
+
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/ExampleMDB.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/unit/MdbTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/unit/MdbTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/unit/MdbTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,134 +1,134 @@
-/*
- * 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.embedded.test.mdb.unit;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.embedded.Bootstrap;
-import org.jboss.embedded.DeploymentGroup;
-import org.jboss.embedded.test.mdb.ExampleMDB;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class MdbTestCase extends TestCase
-{
-   public MdbTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-   public static Test suite() throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTestSuite(MdbTestCase.class);
-
-      // setup test so that embedded JBoss is started/stopped once for all tests here.
-      TestSetup wrapper = new TestSetup(suite)
-      {
-         protected void setUp()
-         {
-            long start = System.currentTimeMillis();
-            try
-            {
-               startupEmbeddedJboss();
-            }
-            finally
-            {
-               System.out.println("Bootstrap took " + (System.currentTimeMillis() - start) + " (ms)");
-            }
-
-         }
-
-         protected void tearDown()
-         {
-            shutdownEmbeddedJboss();
-         }
-      };
-
-      return wrapper;
-   }
-
-   public static void startupEmbeddedJboss()
-   {
-      try
-      {
-         Bootstrap.getInstance().bootstrap();
-      }
-      catch (DeploymentException e)
-      {
-         throw new RuntimeException("Failed to bootstrap", e);
-      }
-   }
-
-   public static void shutdownEmbeddedJboss()
-   {
-      Bootstrap.getInstance().shutdown();
-   }
-
-   public void testSimpleEjb() throws Exception
-   {
-      sendMessage();
-   }
-
-   private static void sendMessage()
-           throws DeploymentException, NamingException, JMSException, InterruptedException
-   {
-      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
-      //group.addResource("mdbtest-service.xml");
-      group.addClasspath("mdb-test.jar");
-      group.process();
-
-      ExampleMDB.executed = false;
-
-      InitialContext ctx = new InitialContext();
-      ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
-      Destination destination = (Destination) ctx.lookup("queue/example");
-      assertNotNull(destination);
-      Connection conn = factory.createConnection();
-      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      TextMessage message = session.createTextMessage("hello");
-      MessageProducer producer = session.createProducer(destination);
-      producer.send(message);
-      session.close();
-      conn.close();
-      Thread.sleep(5000);
-      assertTrue(ExampleMDB.executed);
-   }
-
-}
+/*
+ * 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.embedded.test.mdb.unit;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.embedded.Bootstrap;
+import org.jboss.embedded.DeploymentGroup;
+import org.jboss.embedded.test.mdb.ExampleMDB;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class MdbTestCase extends TestCase
+{
+   public MdbTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+   public static Test suite() throws Exception
+   {
+      TestSuite suite = new TestSuite();
+      suite.addTestSuite(MdbTestCase.class);
+
+      // setup test so that embedded JBoss is started/stopped once for all tests here.
+      TestSetup wrapper = new TestSetup(suite)
+      {
+         protected void setUp()
+         {
+            long start = System.currentTimeMillis();
+            try
+            {
+               startupEmbeddedJboss();
+            }
+            finally
+            {
+               System.out.println("Bootstrap took " + (System.currentTimeMillis() - start) + " (ms)");
+            }
+
+         }
+
+         protected void tearDown()
+         {
+            shutdownEmbeddedJboss();
+         }
+      };
+
+      return wrapper;
+   }
+
+   public static void startupEmbeddedJboss()
+   {
+      try
+      {
+         Bootstrap.getInstance().bootstrap();
+      }
+      catch (DeploymentException e)
+      {
+         throw new RuntimeException("Failed to bootstrap", e);
+      }
+   }
+
+   public static void shutdownEmbeddedJboss()
+   {
+      Bootstrap.getInstance().shutdown();
+   }
+
+   public void testSimpleEjb() throws Exception
+   {
+      sendMessage();
+   }
+
+   private static void sendMessage()
+           throws DeploymentException, NamingException, JMSException, InterruptedException
+   {
+      DeploymentGroup group = Bootstrap.getInstance().createDeploymentGroup();
+      //group.addResource("mdbtest-service.xml");
+      group.addClasspath("mdb-test.jar");
+      group.process();
+
+      ExampleMDB.executed = false;
+
+      InitialContext ctx = new InitialContext();
+      ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
+      Destination destination = (Destination) ctx.lookup("queue/example");
+      assertNotNull(destination);
+      Connection conn = factory.createConnection();
+      Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+      TextMessage message = session.createTextMessage("hello");
+      MessageProducer producer = session.createProducer(destination);
+      producer.send(message);
+      session.close();
+      conn.close();
+      Thread.sleep(5000);
+      assertTrue(ExampleMDB.executed);
+   }
+
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/mdb/unit/MdbTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/remote/Test.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/remote/Test.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/remote/Test.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,36 +1,36 @@
-/*
- * 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.embedded.test.remote;
-
-import javax.ejb.Remote;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
- at Remote
-public interface Test
-{
-   String echo(String e);
-}
+/*
+ * 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.embedded.test.remote;
+
+import javax.ejb.Remote;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+ at Remote
+public interface Test
+{
+   String echo(String e);
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/remote/Test.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/remote/TestBean.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/remote/TestBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/remote/TestBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,39 +1,39 @@
-/*
- * 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.embedded.test.remote;
-
-import javax.ejb.Stateless;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
- at Stateless
-public class TestBean implements Test
-{
-   public String echo(String e)
-   {
-      return e;
-   }
-}
+/*
+ * 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.embedded.test.remote;
+
+import javax.ejb.Stateless;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless
+public class TestBean implements Test
+{
+   public String echo(String e)
+   {
+      return e;
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/remote/TestBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/remote/unit/EjbTestCase.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/remote/unit/EjbTestCase.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/remote/unit/EjbTestCase.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,54 +1,54 @@
-/*
- * 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.embedded.test.remote.unit;
-
-import junit.framework.TestCase;
-import org.jboss.embedded.test.remote.Test;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import java.util.Hashtable;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 42757 $
- */
-public class EjbTestCase extends TestCase
-{
-   public EjbTestCase()
-   {
-      super("BootstrapTestCase");
-   }
-
-   public void testRemoteEjb() throws Exception
-   {
-      Hashtable env = new Hashtable();
-      env.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.JBossRemotingContextFactory.class.getName());
-      env.put(Context.PROVIDER_URL, "socket://172.16.83.75:3873");
-      InitialContext ctx = new InitialContext(env);
-      Test test = (Test)ctx.lookup("TestBean/remote");
-      assertEquals(test.echo("hello world"), "hello world");
-   }
-
-}
+/*
+ * 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.embedded.test.remote.unit;
+
+import junit.framework.TestCase;
+import org.jboss.embedded.test.remote.Test;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import java.util.Hashtable;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 42757 $
+ */
+public class EjbTestCase extends TestCase
+{
+   public EjbTestCase()
+   {
+      super("BootstrapTestCase");
+   }
+
+   public void testRemoteEjb() throws Exception
+   {
+      Hashtable env = new Hashtable();
+      env.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.JBossRemotingContextFactory.class.getName());
+      env.put(Context.PROVIDER_URL, "socket://172.16.83.75:3873");
+      InitialContext ctx = new InitialContext(env);
+      Test test = (Test)ctx.lookup("TestBean/remote");
+      assertEquals(test.echo("hello world"), "hello world");
+   }
+
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/remote/unit/EjbTestCase.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/Customer.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/Customer.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/Customer.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,62 +1,62 @@
-/*
- * 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.embedded.test.vfs;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.GeneratedValue;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
- at Entity
-public class Customer
-{
-   private int id;
-   private String name;
-
-
-   @Id
-   @GeneratedValue
-   public int getId()
-   {
-      return id;
-   }
-
-   public void setId(int id)
-   {
-      this.id = id;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-}
+/*
+ * 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.embedded.test.vfs;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+ at Entity
+public class Customer
+{
+   private int id;
+   private String name;
+
+
+   @Id
+   @GeneratedValue
+   public int getId()
+   {
+      return id;
+   }
+
+   public void setId(int id)
+   {
+      this.id = id;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/Customer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAO.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAO.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAO.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,35 +1,35 @@
-/*
- * 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.embedded.test.vfs;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public interface DAO
-{
-   void create(String name);
-
-   Customer find(String name);
-}
+/*
+ * 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.embedded.test.vfs;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface DAO
+{
+   void create(String name);
+
+   Customer find(String name);
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAO.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAOBean.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAOBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAOBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,52 +1,52 @@
-/*
- * 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.embedded.test.vfs;
-
-import javax.ejb.Stateless;
-import javax.persistence.PersistenceContext;
-import javax.persistence.EntityManager;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
- at Stateless
-public class DAOBean implements DAO
-{
-   @PersistenceContext
-   EntityManager manager;
-
-   public void create(String name)
-   {
-      Customer cust = new Customer();
-      cust.setName(name);
-      manager.persist(cust);
-   }
-
-   public Customer find(String name)
-   {
-      return (Customer)manager.createQuery("Select c from Customer c where c.name = '" + name + "'").getSingleResult();
-   }
-
-}
+/*
+ * 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.embedded.test.vfs;
+
+import javax.ejb.Stateless;
+import javax.persistence.PersistenceContext;
+import javax.persistence.EntityManager;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless
+public class DAOBean implements DAO
+{
+   @PersistenceContext
+   EntityManager manager;
+
+   public void create(String name)
+   {
+      Customer cust = new Customer();
+      cust.setName(name);
+      manager.persist(cust);
+   }
+
+   public Customer find(String name)
+   {
+      return (Customer)manager.createQuery("Select c from Customer c where c.name = '" + name + "'").getSingleResult();
+   }
+
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/DAOBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorld.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorld.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorld.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,33 +1,33 @@
-/*
- * 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.embedded.test.vfs;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
-public interface HelloWorld
-{
-   void hello();
-}
+/*
+ * 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.embedded.test.vfs;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+public interface HelloWorld
+{
+   void hello();
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorld.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorldBean.java
===================================================================
--- trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorldBean.java	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorldBean.java	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,39 +1,39 @@
-/*
- * 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.embedded.test.vfs;
-
-import javax.ejb.Stateless;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision: 1.1 $
- */
- at Stateless
-public class HelloWorldBean implements HelloWorld
-{
-    public void hello()
-    {
-       System.out.println("Hello world");
-    }
-}
+/*
+ * 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.embedded.test.vfs;
+
+import javax.ejb.Stateless;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless
+public class HelloWorldBean implements HelloWorld
+{
+    public void hello()
+    {
+       System.out.println("Hello world");
+    }
+}


Property changes on: trunk/embedded/src/test/java/org/jboss/embedded/test/vfs/HelloWorldBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/resources/ejb/META-INF/persistence.xml
===================================================================
--- trunk/embedded/src/test/resources/ejb/META-INF/persistence.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/resources/ejb/META-INF/persistence.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence>
-   <persistence-unit name="tempdb">
-      <jta-data-source>java:/DefaultDS</jta-data-source>
-      <properties>
-          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-      </properties>
-   </persistence-unit>
-</persistence>
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence>
+   <persistence-unit name="tempdb">
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <properties>
+          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+   </persistence-unit>
+</persistence>


Property changes on: trunk/embedded/src/test/resources/ejb/META-INF/persistence.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/resources/ejb/roles.properties
===================================================================
--- trunk/embedded/src/test/resources/ejb/roles.properties	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/resources/ejb/roles.properties	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1 +1 @@
-scott=allowed
+scott=allowed


Property changes on: trunk/embedded/src/test/resources/ejb/roles.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/resources/ejb/users.properties
===================================================================
--- trunk/embedded/src/test/resources/ejb/users.properties	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/resources/ejb/users.properties	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1 +1 @@
-scott=password
+scott=password


Property changes on: trunk/embedded/src/test/resources/ejb/users.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/resources/mdb/mdbtest-service.xml
===================================================================
--- trunk/embedded/src/test/resources/mdb/mdbtest-service.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/resources/mdb/mdbtest-service.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,17 +1,17 @@
-<server>
-   <mbean code="org.jboss.mq.server.jmx.Queue"
-      name="jboss.mq.destination:service=Queue,name=example">
-      <attribute name="JNDIName">queue/example</attribute>
-      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-   </mbean>
-
-<!--
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=example"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-   -->
-
+<server>
+   <mbean code="org.jboss.mq.server.jmx.Queue"
+      name="jboss.mq.destination:service=Queue,name=example">
+      <attribute name="JNDIName">queue/example</attribute>
+      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+   </mbean>
+
+<!--
+   <mbean code="org.jboss.jms.server.destination.QueueService"
+      name="jboss.messaging.destination:service=Queue,name=example"
+      xmbean-dd="xmdesc/Queue-xmbean.xml">
+      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
+   </mbean>
+   -->
+
 </server>
\ No newline at end of file


Property changes on: trunk/embedded/src/test/resources/mdb/mdbtest-service.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/resources/vfs-test-persistence.xml
===================================================================
--- trunk/embedded/src/test/resources/vfs-test-persistence.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/resources/vfs-test-persistence.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence>
-   <persistence-unit name="vfs">
-      <jta-data-source>java:/DefaultDS</jta-data-source>
-      <properties>
-         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-      </properties>
-   </persistence-unit>
-</persistence>
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence>
+   <persistence-unit name="vfs">
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <properties>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+   </persistence-unit>
+</persistence>


Property changes on: trunk/embedded/src/test/resources/vfs-test-persistence.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/resources/war-resource/web.xml
===================================================================
--- trunk/embedded/src/test/resources/war-resource/web.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/resources/war-resource/web.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-   <description>Embedded JBoss</description>
-
-   <context-param>
-      <param-name>jboss.embedded.resources</param-name>
-      <param-value>/WEB-INF/lib/ejb-test.jar</param-value>
-   </context-param>
-
-   <listener>
-      <listener-class>org.jboss.embedded.ServletContextResourceScanner</listener-class>
-   </listener>
-
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app>
+   <description>Embedded JBoss</description>
+
+   <context-param>
+      <param-name>jboss.embedded.resources</param-name>
+      <param-value>/WEB-INF/lib/ejb-test.jar</param-value>
+   </context-param>
+
+   <listener>
+      <listener-class>org.jboss.embedded.ServletContextResourceScanner</listener-class>
+   </listener>
+
+</web-app>


Property changes on: trunk/embedded/src/test/resources/war-resource/web.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/resources/war-scan/web.xml
===================================================================
--- trunk/embedded/src/test/resources/war-scan/web.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/resources/war-scan/web.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-   <description>Embedded JBoss</description>
-
-   <context-param>
-      <param-name>jboss-kernel-deployments</param-name>
-      <param-value>embedded-jboss-beans.xml, jboss-jms-beans.xml, testjms.xml</param-value>
-   </context-param>
-
-   <listener>
-      <listener-class>org.jboss.embedded.WebInfLibScanner</listener-class>
-   </listener>
-
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app>
+   <description>Embedded JBoss</description>
+
+   <context-param>
+      <param-name>jboss-kernel-deployments</param-name>
+      <param-value>embedded-jboss-beans.xml, jboss-jms-beans.xml, testjms.xml</param-value>
+   </context-param>
+
+   <listener>
+      <listener-class>org.jboss.embedded.WebInfLibScanner</listener-class>
+   </listener>
+
+</web-app>


Property changes on: trunk/embedded/src/test/resources/war-scan/web.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/resources/war-security/Test.jsp
===================================================================
--- trunk/embedded/src/test/resources/war-security/Test.jsp	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/resources/war-security/Test.jsp	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,2 +1,2 @@
-<h1>Hello JSP principal: <%=request.getUserPrincipal()%></h1>
-
+<h1>Hello JSP principal: <%=request.getUserPrincipal()%></h1>
+


Property changes on: trunk/embedded/src/test/resources/war-security/Test.jsp
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/embedded/src/test/resources/war-security/WEB-INF/web.xml
===================================================================
--- trunk/embedded/src/test/resources/war-security/WEB-INF/web.xml	2008-11-14 14:59:40 UTC (rev 81053)
+++ trunk/embedded/src/test/resources/war-security/WEB-INF/web.xml	2008-11-14 15:02:54 UTC (rev 81054)
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-   <description>Embedded Security Test</description>
-
-   <!-- ### Security -->
-   <security-constraint>
-      <web-resource-collection>
-         <web-resource-name>Restricted</web-resource-name>
-         <description>Declarative security tests</description>
-         <url-pattern>/*</url-pattern>
-         <http-method>HEAD</http-method>
-         <http-method>GET</http-method>
-         <http-method>POST</http-method>
-         <http-method>PUT</http-method>
-         <http-method>DELETE</http-method>
-      </web-resource-collection>
-      <auth-constraint>
-         <description>Only authenticated users can access secure content</description>
-         <role-name>tomcat</role-name>
-      </auth-constraint>
-
-      <user-data-constraint>
-         <transport-guarantee>NONE</transport-guarantee>
-      </user-data-constraint>
-   </security-constraint>
-
-   <login-config>
-      <auth-method>BASIC</auth-method>
-      <realm-name>Blah blah</realm-name>
-   </login-config>
-
-   <security-role>
-      <description>A user validated by an X-MyAuthentication</description>
-      <role-name>tomcat</role-name>
-   </security-role>
-
-
-
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app>
+   <description>Embedded Security Test</description>
+
+   <!-- ### Security -->
+   <security-constraint>
+      <web-resource-collection>
+         <web-resource-name>Restricted</web-resource-name>
+         <description>Declarative security tests</description>
+         <url-pattern>/*</url-pattern>
+         <http-method>HEAD</http-method>
+         <http-method>GET</http-method>
+         <http-method>POST</http-method>
+         <http-method>PUT</http-method>
+         <http-method>DELETE</http-method>
+      </web-resource-collection>
+      <auth-constraint>
+         <description>Only authenticated users can access secure content</description>
+         <role-name>tomcat</role-name>
+      </auth-constraint>
+
+      <user-data-constraint>
+         <transport-guarantee>NONE</transport-guarantee>
+      </user-data-constraint>
+   </security-constraint>
+
+   <login-config>
+      <auth-method>BASIC</auth-method>
+      <realm-name>Blah blah</realm-name>
+   </login-config>
+
+   <security-role>
+      <description>A user validated by an X-MyAuthentication</description>
+      <role-name>tomcat</role-name>
+   </security-role>
+
+
+
+</web-app>


Property changes on: trunk/embedded/src/test/resources/war-security/WEB-INF/web.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/embedded/src/test/resources/war-security/hello.html
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list