[jboss-cvs] JBossAS SVN: r89999 - in projects/spider/trunk/deployers: src/main/java/org/jboss/spider/deployers and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 9 14:03:50 EDT 2009
Author: wolfc
Date: 2009-06-09 14:03:50 -0400 (Tue, 09 Jun 2009)
New Revision: 89999
Added:
projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/TomcatDeployer.java
projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/legacy/
projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/legacy/JBossServerImpl.java
projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/legacy/LegacyServerConfig.java
projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/tomcat/
projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/tomcat/TomcatService.java
projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/MockPolicyRegistration.java
projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/MockSecurityManagement.java
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/classloader.xml
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/jca-beans.xml
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/jmx-jboss.xml
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/legacy.xml
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/naming-beans.xml
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/security.xml
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/service-deployers.xml
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/transactionmanager-beans.xml
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/webserver-beans.xml
projects/spider/trunk/deployers/src/test/resources/dummy.war/
projects/spider/trunk/deployers/src/test/resources/dummy.war/dummy.jsp
projects/spider/trunk/deployers/src/test/resources/jndi.properties
projects/spider/trunk/deployers/src/test/resources/server.xml
Modified:
projects/spider/trunk/deployers/pom.xml
projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/AbstractWebTestCase.java
projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/servlet/unit/BasicServletTestCase.java
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap.xml
projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/war-deployers.xml
projects/spider/trunk/deployers/src/test/resources/log4j.xml
Log:
JBAS-7001: booting the legacy tomcat deployers (unit test still failing)
Modified: projects/spider/trunk/deployers/pom.xml
===================================================================
--- projects/spider/trunk/deployers/pom.xml 2009-06-09 17:20:14 UTC (rev 89998)
+++ projects/spider/trunk/deployers/pom.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -27,17 +27,38 @@
<!-- Dependencies -->
<dependencies>
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossjta-integration</artifactId>
+ <version>4.4.0.GA</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>jboss.web</groupId>
+ <artifactId>el-api</artifactId>
+ <version>${version.jboss.web}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss.web</groupId>
<artifactId>jbossweb</artifactId>
<version>${version.jboss.web}</version>
</dependency>
<dependency>
<groupId>jboss.web</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>${version.jboss.web}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss.web</groupId>
<artifactId>servlet-api</artifactId>
<version>${version.jboss.web}</version>
+ <scope>runtime</scope>
</dependency>
<dependency>
@@ -47,6 +68,21 @@
</dependency>
<dependency>
+ <groupId>org.apache</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>3.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- for org.apache:httpclient -->
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.3</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.bootstrap</groupId>
<artifactId>jboss-bootstrap-impl-mc</artifactId>
<version>0.1.2</version>
@@ -72,5 +108,37 @@
<artifactId>jboss-deployers-spi</artifactId>
<version>${version.org.jboss.deployers}</version>
</dependency>
+
+ <!-- For Arjuna -->
+ <dependency>
+ <groupId>apache-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.0.jboss</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossjta</artifactId>
+ <version>4.4.0.GA</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossts-common</artifactId>
+ <version>4.4.0.GA</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-transaction-spi</artifactId>
+ <version>5.0.3.GA</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>oswego-concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <version>1.3.4-jboss-update1</version>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
</project>
Added: projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/TomcatDeployer.java
===================================================================
--- projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/TomcatDeployer.java (rev 0)
+++ projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/TomcatDeployer.java 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.spider.deployers;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class TomcatDeployer extends AbstractSimpleRealDeployer<JBossWebMetaData>
+{
+ /** The web app context implementation class */
+ private String contextClassName = "org.apache.catalina.core.StandardContext";
+
+ public TomcatDeployer()
+ {
+ super(JBossWebMetaData.class);
+
+ setOutput(BeanMetaData.class);
+ }
+
+ @Override
+ public void deploy(DeploymentUnit unit, JBossWebMetaData deployment) throws DeploymentException
+ {
+ throw new RuntimeException("NYI");
+ }
+}
Added: projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/legacy/JBossServerImpl.java
===================================================================
--- projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/legacy/JBossServerImpl.java (rev 0)
+++ projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/legacy/JBossServerImpl.java 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,182 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.spider.deployers.legacy;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.management.NotificationBroadcasterSupport;
+import javax.management.NotificationEmitter;
+
+import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.ServerProcess;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.bootstrap.spi.mc.server.MCServer;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class JBossServerImpl extends NotificationBroadcasterSupport
+ implements NotificationEmitter, ServerProcess
+{
+ private MCServer server;
+ private ServerConfig config;
+
+ public void exit()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void exit(int exitcode)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void halt()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void halt(int exitcode)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getBuildDate()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getBuildID()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getBuildJVM()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getBuildNumber()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getBuildOS()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public ServerConfig getConfig() throws IllegalStateException
+ {
+ if(config == null)
+ {
+ synchronized (this)
+ {
+ if(config == null)
+ config = new LegacyServerConfig(server.getConfiguration());
+ }
+ }
+ return config;
+ }
+
+ public Map<String, Object> getMetaData()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public Date getStartDate()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getVersion()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getVersionName()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getVersionNumber()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void init(Properties props) throws IllegalStateException, Exception
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void init(Properties props, Map<String, Object> metaData) throws IllegalStateException, Exception
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public boolean isInShutdown()
+ {
+ return server.getState() == LifecycleState.STOPPING;
+ }
+
+ public boolean isStarted()
+ {
+ //return server.getState() == LifecycleState.STARTED;
+ // TomcatService.startService will only start the connectors if the server has already started
+ return true;
+ }
+
+ public void setServer(MCServer server)
+ {
+ this.server = server;
+ }
+
+ public void shutdown() throws IllegalStateException
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void start() throws IllegalStateException, Exception
+ {
+ // do nothing
+ }
+}
Added: projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/legacy/LegacyServerConfig.java
===================================================================
--- projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/legacy/LegacyServerConfig.java (rev 0)
+++ projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/legacy/LegacyServerConfig.java 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,223 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.spider.deployers.legacy;
+
+import java.io.File;
+import java.net.URL;
+
+import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class LegacyServerConfig implements ServerConfig
+{
+ private MCServerConfig config;
+
+ /**
+ * @param configuration
+ */
+ public LegacyServerConfig(MCServerConfig configuration)
+ {
+ this.config = configuration;
+ }
+
+ public boolean getBlockingShutdown()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getBootstrapURL()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getCommonBaseURL()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getCommonLibraryURL()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public boolean getExitOnShutdown()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public File getHomeDir()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getHomeURL()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getLibraryURL()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getPatchURL()
+ {
+ return null;
+ }
+
+ public boolean getPlatformMBeanServer()
+ {
+ return false;
+ }
+
+ public boolean getRequireJBossURLStreamHandlerFactory()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getRootDeploymentFilename()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public File getServerBaseDir()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getServerBaseURL()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getServerConfigURL()
+ {
+ return config.getBootstrapHome();
+ }
+
+ public File getServerDataDir()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public File getServerHomeDir()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getServerHomeURL()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public URL getServerLibraryURL()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public File getServerLogDir()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getServerName()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public File getServerNativeDir()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public File getServerTempDeployDir()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public File getServerTempDir()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public String getSpecificationVersion()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public boolean isInstallLifeThread()
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void setBlockingShutdown(boolean blockingShutdown)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void setExitOnShutdown(boolean flag)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void setRequireJBossURLStreamHandlerFactory(boolean requireJBossURLStreamHandlerFactory)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void setRootDeploymentFilename(String filename)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+}
Added: projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/tomcat/TomcatService.java
===================================================================
--- projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/tomcat/TomcatService.java (rev 0)
+++ projects/spider/trunk/deployers/src/main/java/org/jboss/spider/deployers/tomcat/TomcatService.java 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.spider.deployers.tomcat;
+
+import javax.management.MBeanServer;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class TomcatService extends org.jboss.web.tomcat.service.deployers.TomcatService
+{
+ public void setMBeanServer(MBeanServer server)
+ {
+ this.server = server;
+ }
+}
Modified: projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/AbstractWebTestCase.java
===================================================================
--- projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/AbstractWebTestCase.java 2009-06-09 17:20:14 UTC (rev 89998)
+++ projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/AbstractWebTestCase.java 2009-06-09 18:03:50 UTC (rev 89999)
@@ -21,6 +21,7 @@
*/
package org.jboss.spider.deployers.test.common;
+import java.io.File;
import java.io.IOException;
import java.lang.reflect.AnnotatedElement;
import java.net.URL;
@@ -47,6 +48,7 @@
import org.jboss.metadata.annotation.finder.DefaultAnnotationFinder;
import org.jboss.metadata.web.spec.Web25MetaData;
import org.jboss.spider.deployers.test.servlet.unit.BasicServletTestCase;
+import org.jboss.virtual.MemoryFileFactory;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
import org.junit.AfterClass;
@@ -75,13 +77,26 @@
@BeforeClass
public static void beforeClass() throws Exception
{
+ System.setProperty("xb.builder.useUnorderedSequence", "true");
+
+ File serverHomeDir = new File("src/test/resources");
+ // FIXME: TomcatService at 183
+ System.setProperty("jboss.server.home.dir", serverHomeDir.getAbsolutePath());
+
+ // StandardContext.engineBase at 4803
+ System.setProperty("catalina.base", serverHomeDir.getAbsolutePath());
+
+ // See server.xml
+ System.setProperty("jboss.bind.address", "localhost");
+
VFS.init();
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
// or via jboss-cl
// VirtualFile roots[] = { };
// classLoader = ClassLoaderSystem.getInstance().registerClassLoaderPolicy(VFSClassLoaderPolicy.createVFSClassLoaderPolicy("preboot-cl", roots));
MCServerConfig config = MCServerConfigFactory.createServerConfig(classLoader);
- config.bootstrapHome("file:src/test/resources/conf");
+ File confDir = new File("src/test/resources/conf");
+ config.bootstrapHome(confDir.toURI().toURL().toString());
server = MCServerFactory.createServer(classLoader);
server.setConfiguration(config);
server.initialize();
@@ -144,9 +159,15 @@
try
{
URL url = new URL("vfsmemory", name, "");
+ MemoryFileFactory.createRoot(url);
+ // create some dummy contents so we can have a virtual war file
+ byte contents[] = { };
+ MemoryFileFactory.putFile(new URL(url, name + ".war"), contents);
VirtualFile root = VFS.getRoot(url);
- VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(root);
+ VirtualFile war = root.getChild(name + ".war");
+ VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(war);
MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
+ attachments.addAttachment("org.jboss.web.explicitDocBase", "dummy.war");
attachments.addAttachment(attachmentType, attachment);
return deployment;
}
Added: projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/MockPolicyRegistration.java
===================================================================
--- projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/MockPolicyRegistration.java (rev 0)
+++ projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/MockPolicyRegistration.java 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.spider.deployers.test.common;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Map;
+
+import org.jboss.security.authorization.PolicyRegistration;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class MockPolicyRegistration implements PolicyRegistration
+{
+
+ public void deRegisterPolicy(String contextID, String type)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public <T> T getPolicy(String contextID, String type, Map<String, Object> contextMap)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void registerPolicy(String contextID, String type, URL location)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void registerPolicy(String contextID, String type, InputStream stream)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public <P> void registerPolicyConfig(String contextId, String type, P policyConfig)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public void registerPolicyConfigFile(String contextId, String type, InputStream stream)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+}
Added: projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/MockSecurityManagement.java
===================================================================
--- projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/MockSecurityManagement.java (rev 0)
+++ projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/common/MockSecurityManagement.java 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.spider.deployers.test.common;
+
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.AuthorizationManager;
+import org.jboss.security.ISecurityManagement;
+import org.jboss.security.audit.AuditManager;
+import org.jboss.security.identitytrust.IdentityTrustManager;
+import org.jboss.security.mapping.MappingManager;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class MockSecurityManagement implements ISecurityManagement
+{
+ private static final long serialVersionUID = 1L;
+
+ public AuditManager getAuditManager(String securityDomain)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public AuthenticationManager getAuthenticationManager(String securityDomain)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public AuthorizationManager getAuthorizationManager(String securityDomain)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public IdentityTrustManager getIdentityTrustManager(String securityDomain)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+ public MappingManager getMappingManager(String securityDomain)
+ {
+ // TODO Auto-generated method stub
+ throw new RuntimeException("NYI");
+ }
+
+}
Modified: projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/servlet/unit/BasicServletTestCase.java
===================================================================
--- projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/servlet/unit/BasicServletTestCase.java 2009-06-09 17:20:14 UTC (rev 89998)
+++ projects/spider/trunk/deployers/src/test/java/org/jboss/spider/deployers/test/servlet/unit/BasicServletTestCase.java 2009-06-09 18:03:50 UTC (rev 89999)
@@ -21,8 +21,16 @@
*/
package org.jboss.spider.deployers.test.servlet.unit;
+import java.io.File;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.metadata.web.spec.WebMetaData;
import org.jboss.spider.deployers.test.common.AbstractWebTestCase;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
import org.junit.Test;
/**
@@ -32,8 +40,31 @@
public class BasicServletTestCase extends AbstractWebTestCase
{
@Test
+ //@Ignore
public void test1() throws Exception
{
deploy(deployment("servlet", WebMetaData.class, servlets(BasicServletTestCase.class)));
+
+ HttpClient client = new HttpClient();
+ GetMethod method = new GetMethod("http://localhost:8080/servlet");
+ client.setTimeout(1000);
+ int result = client.executeMethod(method);
+ System.out.println("result = " + result);
}
+
+ @Test
+ public void test2() throws Exception
+ {
+ File file = new File("src/test/resources");
+ VirtualFile root = VFS.getRoot(file.toURI().toURL());
+ VirtualFile war = root.getChild("dummy.war");
+ VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(war);
+ deploy(deployment);
+
+ HttpClient client = new HttpClient();
+ GetMethod method = new GetMethod("http://localhost:8080/dummy/dummy.jsp?visitor=me");
+ client.setTimeout(1000);
+ int result = client.executeMethod(method);
+ System.out.println("result = " + result);
+ }
}
Added: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/classloader.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/classloader.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/classloader.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Minimalistic classloader deployer
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <!--
+ The classloader implementation
+ -->
+ <bean name="ClassLoaderSystem" class="org.jboss.classloader.spi.ClassLoaderSystem">
+ <classloader><null/></classloader>
+ <constructor factoryClass="org.jboss.classloader.spi.ClassLoaderSystem" factoryMethod="getInstance"/>
+ </bean>
+
+ <!--
+ ClassLoader management and resolution
+ -->
+ <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
+ <classloader><null/></classloader>
+ <incallback method="addModule" state="Configured"/>
+ <uncallback method="removeModule" state="Configured"/>
+ </bean>
+
+ <bean name="ClassLoadingMetaDataParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
+ <constructor>
+ <parameter>org.jboss.classloading.spi.metadata.ClassLoadingMetaData</parameter>
+ </constructor>
+ <property name="name">jboss-classloading.xml</property>
+ <property name="buildManagedObject">true</property>
+ </bean>
+ <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
+ <property name="defaultMetaData">
+ <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true"/>
+ </property>
+ </bean>
+ <bean name="InMemoryClassesDeployer" class="org.jboss.deployers.vfs.plugins.classloader.InMemoryClassesDeployer"/>
+ <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer"/>
+ <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
+ <property name="classLoading"><inject bean="ClassLoading"/></property>
+ </bean>
+ <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
+ <property name="classLoading"><inject bean="ClassLoading"/></property>
+ <property name="system"><inject bean="ClassLoaderSystem"/></property>
+ </bean>
+</deployment>
Added: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/jca-beans.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/jca-beans.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/jca-beans.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ -->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <!-- CACHED CONNECTION MANAGER -->
+ <bean name="CachedConnectionManager" class="org.jboss.resource.connectionmanager.CachedConnectionManager">
+
+ <!-- Expose via JMX -->
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.jca:service=CachedConnectionManager", exposedInterface=org.jboss.resource.connectionmanager.CachedConnectionManagerMBean.class)</annotation>
+
+ <!-- Whether to track unclosed connections and close them -->
+ <property name="debug">true</property>
+
+ <!-- Whether to throw an error for unclosed connections (true) or just log a warning (false) -->
+ <property name="error">false</property>
+
+ <!-- The transaction manager -->
+ <property name="transactionManager"><inject bean="TransactionManager" property="transactionManager"/></property>
+
+ </bean>
+</deployment>
\ No newline at end of file
Added: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/jmx-jboss.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/jmx-jboss.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/jmx-jboss.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ -->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="ServerInfo" class="org.jboss.system.server.ServerInfo">
+ <alias>jboss.system:type=ServerInfo</alias>
+ </bean>
+
+ <!-- The legacy JMX kernel -->
+ <bean name="JMXKernel" class="org.jboss.system.server.jmx.JMXKernel">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+ <property name="serverImpl"><inject bean="LegacyJBossServer"/></property>
+ <property name="serverInfo"><inject bean="ServerInfo"/></property>
+ </bean>
+</deployment>
\ No newline at end of file
Added: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/legacy.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/legacy.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/legacy.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ -->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="LegacyJBossServer" class="org.jboss.spider.deployers.legacy.JBossServerImpl">
+ <property name="server"><inject bean="JBossServer"/></property>
+ </bean>
+</deployment>
\ No newline at end of file
Added: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/naming-beans.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/naming-beans.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/naming-beans.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <!-- JNDI -->
+ <bean name="NameServer" class="org.jnp.server.SingletonNamingServer"/>
+
+ <bean name="JavaCompInitializer" class="org.jboss.naming.JavaCompInitializer">
+ <depends>NameServer</depends>
+ </bean>
+</deployment>
\ No newline at end of file
Added: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/security.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/security.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/security.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ -->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="JBossSecurityManagement" class="org.jboss.spider.deployers.test.common.MockSecurityManagement"/>
+
+ <bean name="JBossSecurityPolicyRegistration" class="org.jboss.spider.deployers.test.common.MockPolicyRegistration"/>
+</deployment>
\ No newline at end of file
Added: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/service-deployers.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/service-deployers.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/service-deployers.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ -->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <!-- JMX Deployment -->
+ <bean name="ServiceMetaDataICF" class="org.jboss.system.deployers.managed.ServiceMetaDataICF">
+ <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+ <property name="controller"><inject bean="JMXKernel" property="serviceController"/></property>
+ </bean>
+ <bean name="SARDeployer" class="org.jboss.system.deployers.SARDeployer"/>
+ <bean name="ServiceClassLoaderDeployer" class="org.jboss.system.deployers.ServiceClassLoaderDeployer"/>
+ <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>
+</deployment>
\ No newline at end of file
Added: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/transactionmanager-beans.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/transactionmanager-beans.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/transactionmanager-beans.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <!-- JTA -->
+ <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager",exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class,registerDirectly=true)</annotation>
+
+ <property name="transactionTimeout">300</property>
+ <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
+ <!--
+ <property name="mbeanServer"><inject bean="MBeanServer"/></property>
+ -->
+ <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+
+ <!-- TODO: use service binding manager -->
+
+ <property name="transactionStatusManagerInetAddress">localhost</property>
+ <property name="transactionStatusManagerPort">5712</property>
+
+ <property name="recoveryInetAddress">localhost</property>
+ <property name="recoveryPort">5713</property>
+
+ <property name="socketProcessIdPort">0</property>
+
+ </bean>
+
+ <!-- expose javax.transaction.TransactionManager -->
+ <bean name="RealTransactionManager">
+ <constructor factoryMethod="getTransactionManager">
+ <factory bean="TransactionManager"/>
+ </constructor>
+ </bean>
+</deployment>
Modified: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/war-deployers.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/war-deployers.xml 2009-06-09 17:20:14 UTC (rev 89998)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/war-deployers.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -3,7 +3,20 @@
-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <!-- See JBAS-6062 -->
+ <bean name="WebXmlLessDeployer" class="org.jboss.deployment.LegacyWebXmlLessDeployer"/>
+
<bean name="WarDeployer" class="org.jboss.web.tomcat.service.deployers.TomcatDeployer">
+ <property name="domain">jboss.web</property>
+
+ <!-- Specify a Bean for JBoss Security PolicyRegistration -->
+ <property name="policyRegistrationName">JBossSecurityPolicyRegistration</property>
+
+ <!-- Specify a SecurityManagement Wrapper -->
+ <property name="securityManagementName">JBossSecurityManagement</property>
+
+ <!-- Specify a SecurityContext FQN class name -->
+ <property name="securityContextClassName">org.jboss.security.plugins.JBossSecurityContext</property>
</bean>
<bean name="MergedJBossWebMetaDataDeployer" class="org.jboss.web.deployers.MergedJBossWebMetaDataDeployer"/>
Added: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/webserver-beans.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/webserver-beans.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap/webserver-beans.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ -->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="WebServer" class="org.jboss.spider.deployers.tomcat.TomcatService">
+ <!--
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=WebServer", exposedInterface=org.jboss.web.tomcat.service.deployers.TomcatServiceMBean.class,registerDirectly=true)</annotation>
+ -->
+ <alias>jboss.web:service=WebServer</alias>
+
+ <!-- Inject the TomcatDeployer -->
+ <property name="tomcatDeployer"><inject bean="WarDeployer"/></property>
+
+ <property name="MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+ </bean>
+</deployment>
\ No newline at end of file
Modified: projects/spider/trunk/deployers/src/test/resources/conf/bootstrap.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/conf/bootstrap.xml 2009-06-09 17:20:14 UTC (rev 89998)
+++ projects/spider/trunk/deployers/src/test/resources/conf/bootstrap.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -14,8 +14,19 @@
<url>bootstrap/profile.xml</url>
-->
- <url>bootstrap/jmx-jdk.xml</url>
+ <url>bootstrap/classloader.xml</url>
+ <url>bootstrap/jmx-jboss.xml</url>
<url>bootstrap/deployers.xml</url>
+ <url>bootstrap/legacy.xml</url>
+ <url>bootstrap/service-deployers.xml</url>
+
+ <url>bootstrap/naming-beans.xml</url>
+ <!--
+ <url>bootstrap/transactionmanager-beans.xml</url>
+ <url>bootstrap/jca-beans.xml</url>
+ -->
<url>bootstrap/jpa.xml</url>
+ <url>bootstrap/security.xml</url>
<url>bootstrap/war-deployers.xml</url>
+ <url>bootstrap/webserver-beans.xml</url>
</bootstrap>
Added: projects/spider/trunk/deployers/src/test/resources/dummy.war/dummy.jsp
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/dummy.war/dummy.jsp (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/dummy.war/dummy.jsp 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1 @@
+Hello, ${param.visitor}
\ No newline at end of file
Added: projects/spider/trunk/deployers/src/test/resources/jndi.properties
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/jndi.properties (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/jndi.properties 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,2 @@
+java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
Modified: projects/spider/trunk/deployers/src/test/resources/log4j.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/log4j.xml 2009-06-09 17:20:14 UTC (rev 89998)
+++ projects/spider/trunk/deployers/src/test/resources/log4j.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -102,10 +102,18 @@
</category>
-->
+ <category name="org.apache.catalina">
+ <priority value="ALL"/>
+ </category>
+
<category name="org.jboss">
<priority value="INFO"/>
</category>
+ <category name="org.jboss.web">
+ <priority value="ALL"/>
+ </category>
+
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
Added: projects/spider/trunk/deployers/src/test/resources/server.xml
===================================================================
--- projects/spider/trunk/deployers/src/test/resources/server.xml (rev 0)
+++ projects/spider/trunk/deployers/src/test/resources/server.xml 2009-06-09 18:03:50 UTC (rev 89999)
@@ -0,0 +1,169 @@
+<Server>
+
+ <!-- Optional listener which ensures correct init and shutdown of APR,
+ and provides information if it is not installed -->
+ <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
+ <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
+ <Listener className="org.apache.catalina.core.JasperListener" />
+
+ <Service name="jboss.web">
+
+ <!-- A HTTP/1.1 Connector on port 8080 -->
+ <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"
+ connectionTimeout="20000" redirectPort="8443" />
+
+ <!-- Add this option to the connector to avoid problems with
+ .NET clients that don't implement HTTP/1.1 correctly
+ restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$"
+ -->
+
+ <!-- A AJP 1.3 Connector on port 8009 -->
+ <Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"
+ redirectPort="8443" />
+
+ <!-- SSL/TLS Connector configuration using the admin devl guide keystore
+ <Connector protocol="HTTP/1.1" SSLEnabled="true"
+ port="8443" address="${jboss.bind.address}"
+ scheme="https" secure="true" clientAuth="false"
+ keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
+ keystorePass="rmi+ssl" sslProtocol = "TLS" />
+ -->
+
+ <Engine name="jboss.web" defaultHost="localhost">
+
+ <!-- The JAAS based authentication and authorization realm implementation
+ that is compatible with the jboss 3.2.x realm implementation.
+ - certificatePrincipal : the class name of the
+ org.jboss.security.auth.certs.CertificatePrincipal impl
+ used for mapping X509[] cert chains to a Princpal.
+ - allRolesMode : how to handle an auth-constraint with a role-name=*,
+ one of strict, authOnly, strictAuthOnly
+ + strict = Use the strict servlet spec interpretation which requires
+ that the user have one of the web-app/security-role/role-name
+ + authOnly = Allow any authenticated user
+ + strictAuthOnly = Allow any authenticated user only if there are no
+ web-app/security-roles
+ -->
+ <Realm className="org.jboss.web.tomcat.security.JBossWebRealm"
+ certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
+ allRolesMode="authOnly"
+ />
+ <!-- A subclass of JBossSecurityMgrRealm that uses the authentication
+ behavior of JBossSecurityMgrRealm, but overrides the authorization
+ checks to use JACC permissions with the current java.security.Policy
+ to determine authorized access.
+ - allRolesMode : how to handle an auth-constraint with a role-name=*,
+ one of strict, authOnly, strictAuthOnly
+ + strict = Use the strict servlet spec interpretation which requires
+ that the user have one of the web-app/security-role/role-name
+ + authOnly = Allow any authenticated user
+ + strictAuthOnly = Allow any authenticated user only if there are no
+ web-app/security-roles
+ <Realm className="org.jboss.web.tomcat.security.JaccAuthorizationRealm"
+ certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
+ allRolesMode="authOnly"
+ />
+ -->
+
+ <Host name="localhost">
+
+ <!-- Uncomment to enable request dumper. This Valve "logs interesting
+ contents from the specified Request (before processing) and the
+ corresponding Response (after processing). It is especially useful
+ in debugging problems related to headers and cookies."
+ -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve" />
+ -->
+
+ <!-- Access logger -->
+ <!--
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ prefix="localhost_access_log." suffix=".log"
+ pattern="common" directory="${jboss.server.log.dir}"
+ resolveHosts="false" />
+ -->
+
+ <!-- Uncomment to enable single sign-on across web apps
+ deployed to this host. Does not provide SSO across a cluster.
+
+ If this valve is used, do not use the JBoss ClusteredSingleSignOn
+ valve shown below.
+
+ A new configuration attribute is available beginning with
+ release 4.0.4:
+
+ cookieDomain configures the domain to which the SSO cookie
+ will be scoped (i.e. the set of hosts to
+ which the cookie will be presented). By default
+ the cookie is scoped to "/", meaning the host
+ that presented it. Set cookieDomain to a
+ wider domain (e.g. "xyz.com") to allow an SSO
+ to span more than one hostname.
+ -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
+ -->
+
+ <!-- Uncomment to enable single sign-on across web apps
+ deployed to this host AND to all other hosts in the cluster.
+
+ If this valve is used, do not use the standard Tomcat SingleSignOn
+ valve shown above.
+
+ Valve uses a JBossCache instance to support SSO credential
+ caching and replication across the cluster. The JBossCache
+ instance must be configured separately. See the
+ "jboss-web-clusteredsso-beans.xml" file in the
+ server/all/deploy directory for cache configuration details.
+
+ Besides the attributes supported by the standard Tomcat
+ SingleSignOn valve (see the Tomcat docs), this version also
+ supports the following attributes:
+
+ cookieDomain see non-clustered valve above
+
+ cacheConfig Name of the CacheManager service configuration
+ to use for the clustered SSO cache. See
+ deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml
+ Default is "clustered-sso".
+
+ treeCacheName Deprecated. Use "cacheConfig".
+ JMX ObjectName of the JBoss Cache MBean used to
+ support credential caching and replication across
+ the cluster. Only used if no cache can be located
+ from the CacheManager service using the "cacheConfig"
+ attribute (or its default value). If not set, the
+ default is "jboss.cache:service=TomcatClusteringCache"
+
+ maxEmptyLife The maximum number of seconds an SSO with no
+ active sessions will be usable by a request
+
+ processExpiresInterval The minimum number of seconds between
+ efforts by the valve to find and invalidate
+ SSO's that have exceeded their 'maxEmptyLife'.
+ Does not imply effort will be spent on such
+ cleanup every 'processExpiresInterval'.
+ -->
+ <!--
+ <Valve className="org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn" />
+ -->
+
+ <!-- Check for unclosed connections and transaction terminated checks
+ in servlets/jsps.
+
+ Important: The dependency on the CachedConnectionManager
+ in META-INF/jboss-service.xml must be uncommented, too
+ -->
+
+ <!--
+ <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
+ cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
+ transactionManagerObjectName="jboss:service=TransactionManager" />
+ -->
+ </Host>
+ </Engine>
+
+ </Service>
+
+</Server>
More information about the jboss-cvs-commits
mailing list