[webbeans-commits] Webbeans SVN: r2628 - ri/trunk/jboss-as.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-26 21:18:17 -0400 (Sun, 26 Apr 2009)
New Revision: 2628
Modified:
ri/trunk/jboss-as/build.xml
Log:
local.build.properties should take precedence over build.properties (in Ant that means it comes first)
Modified: ri/trunk/jboss-as/build.xml
===================================================================
--- ri/trunk/jboss-as/build.xml 2009-04-25 18:40:24 UTC (rev 2627)
+++ ri/trunk/jboss-as/build.xml 2009-04-27 01:18:17 UTC (rev 2628)
@@ -6,8 +6,8 @@
<property name="maven.dir" location="${basedir}/lib/maven" />
+ <property file="local.build.properties" />
<property file="build.properties" />
- <property file="local.build.properties" />
<target name="clean" description="Clean up after the JBoss updater">
<delete dir="target" failonerror="false" />
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2627 - test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-25 14:40:24 -0400 (Sat, 25 Apr 2009)
New Revision: 2627
Modified:
test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EjbJarArtifactDescriptor.java
Log:
don't fail if ejb-jar.xml or persistence.xml are not present...they are optional anyway
Modified: test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EjbJarArtifactDescriptor.java
===================================================================
--- test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EjbJarArtifactDescriptor.java 2009-04-25 17:31:47 UTC (rev 2626)
+++ test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EjbJarArtifactDescriptor.java 2009-04-25 18:40:24 UTC (rev 2627)
@@ -42,7 +42,12 @@
{
ejbJarXmlLocation = loadResource(STANDARD_EJB_JAR_XML_FILE_NAME);
}
- getResources().add(new ResourceDescriptorImpl(EJB_JAR_XML_DESTINATION, ejbJarXmlLocation));
+
+ // only use the ejb-jar descriptor if available
+ if (ejbJarXmlLocation != null)
+ {
+ getResources().add(new ResourceDescriptorImpl(EJB_JAR_XML_DESTINATION, ejbJarXmlLocation));
+ }
}
if (persistenceXml != null)
@@ -56,7 +61,12 @@
{
persistenceXmlLocation = loadResource(STANDARD_PERSISTENCE_XML_FILE_NAME);
}
- getResources().add(new ResourceDescriptorImpl(PERSISTENCE_XML_DESTINATION, persistenceXmlLocation));
+
+ // only use the persistence descriptor if available
+ if (persistenceXmlLocation != null)
+ {
+ getResources().add(new ResourceDescriptorImpl(PERSISTENCE_XML_DESTINATION, persistenceXmlLocation));
+ }
}
return this;
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2626 - in test-harness/trunk: impl/src/main/java/org/jboss/testharness/impl/packaging/ear and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-25 13:31:47 -0400 (Sat, 25 Apr 2009)
New Revision: 2626
Added:
test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/PersistenceXml.java
test-harness/trunk/tests/src/test/java/org/jboss/testharness/impl/packaging/ear/persistence.xml
test-harness/trunk/tests/src/test/resources/org/jboss/testharness/impl/packaging/ear/persistence.xml
test-harness/trunk/tests/src/test/resources/org/jboss/testharness/test/impl/packaging/descriptors/
test-harness/trunk/tests/src/test/resources/org/jboss/testharness/test/impl/packaging/descriptors/ear/
test-harness/trunk/tests/src/test/resources/org/jboss/testharness/test/impl/packaging/descriptors/ear/dummy-ds.xml
test-harness/trunk/tests/src/test/resources/org/jboss/testharness/test/impl/packaging/descriptors/ear/import.sql
Modified:
test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ArtifactGenerator.java
test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/Resource.java
test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EarArtifactDescriptor.java
test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EjbJarArtifactDescriptor.java
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/descriptors/ear/EarArtifactTest.java
Log:
add support for persistence.xml in EAR packaging (with tests)
allow use of @Resource directly on @Artifact class
add support for packaging resource inside of EJB-JAR or WAR in EAR packaging (with tests)
report number of artifacts to be dumped
Modified: test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ArtifactGenerator.java
===================================================================
--- test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ArtifactGenerator.java 2009-04-25 17:25:09 UTC (rev 2625)
+++ test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ArtifactGenerator.java 2009-04-25 17:31:47 UTC (rev 2626)
@@ -19,6 +19,7 @@
import org.jboss.testharness.api.ResourceDescriptor;
import org.jboss.testharness.impl.packaging.ear.EarArtifactDescriptor;
import org.jboss.testharness.impl.packaging.ear.EjbJarXml;
+import org.jboss.testharness.impl.packaging.ear.PersistenceXml;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.jboss.testharness.impl.packaging.jsr299.JSR299ArtifactDescriptor;
import org.jboss.testharness.impl.packaging.jsr299.TCKArtifactDescriptor;
@@ -37,6 +38,7 @@
private final boolean addDeclaringPackage;
private final String beansXml;
private final String ejbJarXml;
+ private final String persistenceXml;
private final PackagingType packagingType;
private final Collection<ResourceDescriptor> resources;
private final Collection<Class<?>> classes;
@@ -82,13 +84,21 @@
if (declaringClass.isAnnotationPresent(EjbJarXml.class))
{
- this.ejbJarXml = asAbsolutePath(declaringClass.getAnnotation(EjbJarXml.class).value());
+ this.ejbJarXml = asAbsolutePath(declaringClass.getAnnotation(EjbJarXml.class).value());
}
else
{
this.ejbJarXml = null;
}
-
+
+ if (declaringClass.isAnnotationPresent(PersistenceXml.class))
+ {
+ this.persistenceXml = asAbsolutePath(declaringClass.getAnnotation(PersistenceXml.class).value());
+ }
+ else
+ {
+ this.persistenceXml = null;
+ }
if (declaringClass.isAnnotationPresent(IntegrationTest.class))
{
@@ -100,14 +110,16 @@
this.unit = true;
this.runLocally = false;
}
-
- if (declaringClass.isAnnotationPresent(Resources.class))
+
+ this.resources = new ArrayList<ResourceDescriptor>();
+ if (declaringClass.isAnnotationPresent(Resource.class))
{
- this.resources = asResourceDescriptors(declaringClass.getAnnotation(Resources.class).value());
+ this.resources.add(asResourceDescriptor(declaringClass.getAnnotation(Resource.class)));
}
- else
+
+ if (declaringClass.isAnnotationPresent(Resources.class))
{
- this.resources = Collections.emptyList();
+ this.resources.addAll(asResourceDescriptors(declaringClass.getAnnotation(Resources.class).value()));
}
if (declaringClass.isAnnotationPresent(Classes.class))
@@ -163,7 +175,7 @@
public TCKArtifactDescriptor createArtifact()
{
- final TCKArtifactDescriptor artifact = newArtifact(packagingType, declaringClass, beansXml, ejbJarXml, standalone, addDeclaringPackage);
+ final TCKArtifactDescriptor artifact = newArtifact(packagingType, declaringClass, beansXml, ejbJarXml, persistenceXml, standalone, addDeclaringPackage);
artifact.setUnit(unit);
artifact.setRunLocally(runLocally);
artifact.setExpectedDeploymentException(expectedDeploymentException);
@@ -184,10 +196,15 @@
List<ResourceDescriptor> resourceDescriptorImpls = new ArrayList<ResourceDescriptor>();
for (Resource resource : resources)
{
- resourceDescriptorImpls.add(new ResourceDescriptorImpl(resource.destination(), asAbsolutePath(resource.source())));
+ resourceDescriptorImpls.add(asResourceDescriptor(resource));
}
return resourceDescriptorImpls;
}
+
+ private ResourceDescriptor asResourceDescriptor(Resource resource)
+ {
+ return new ResourceDescriptorImpl(resource.destination(), asAbsolutePath(resource.source()));
+ }
private String asAbsolutePath(String path)
{
@@ -201,7 +218,7 @@
}
}
- private static TCKArtifactDescriptor newArtifact(PackagingType packagingType, Class<?> declaringClass, String beansXml, String ejbJarXml, boolean standalone, boolean addDeclaringPackage)
+ private static TCKArtifactDescriptor newArtifact(PackagingType packagingType, Class<?> declaringClass, String beansXml, String ejbJarXml, String persistenceXml, boolean standalone, boolean addDeclaringPackage)
{
TCKArtifactDescriptor artifact;
if (!standalone && packagingType.equals(WAR))
@@ -214,7 +231,7 @@
}
else if (!standalone && packagingType.equals(EAR))
{
- artifact = new EarArtifactDescriptor(declaringClass, beansXml, ejbJarXml).initialize();
+ artifact = new EarArtifactDescriptor(declaringClass, beansXml, ejbJarXml, persistenceXml).initialize();
}
else
{
@@ -276,7 +293,7 @@
{
throw new IllegalStateException("Cannot use debug directory " + configuration.getOutputDirectory() + ", it already exists");
}
- log.info("Writing artifacts to " + configuration.getOutputDirectory());
+ log.info("Writing " + artifacts.size() + " artifact(s) to " + configuration.getOutputDirectory());
for (ArtifactDescriptor artifact : artifacts)
{
try
Modified: test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/Resource.java
===================================================================
--- test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/Resource.java 2009-04-25 17:25:09 UTC (rev 2625)
+++ test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/Resource.java 2009-04-25 17:31:47 UTC (rev 2626)
@@ -10,7 +10,9 @@
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
/**
- * Specify an additional resource to be added to the artifact.
+ * Specify an additional resource to be added to the artifact. You can
+ * specify muliple resources by nesting multiple @Resource annotations
+ * within a @Resources annotation.
*
* @see Resources
* @see BeansXml
Modified: test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EarArtifactDescriptor.java
===================================================================
--- test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EarArtifactDescriptor.java 2009-04-25 17:25:09 UTC (rev 2625)
+++ test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EarArtifactDescriptor.java 2009-04-25 17:31:47 UTC (rev 2626)
@@ -18,16 +18,18 @@
{
private static final Logger log = Logger.getLogger(EarArtifactDescriptor.class);
-
+ private static final String WAR_RESOURCE_PREFIX = "war:/";
+ private static final String EJB_JAR_RESOURCE_PREFIX = "ejb-jar:/";
+
public static final String APPLICATION_XML_DESTINATION = "META-INF/application.xml";
private final EjbJarArtifactDescriptor ejbJar;
private final WarArtifactDescriptor war;
- public EarArtifactDescriptor(Class<?> declaringClass, String beansXmlSourceFileName, String ejbJarXml)
+ public EarArtifactDescriptor(Class<?> declaringClass, String beansXmlSourceFileName, String ejbJarXml, String persistenceXml)
{
super(declaringClass, null);
- this.ejbJar = new EjbJarArtifactDescriptor(declaringClass, beansXmlSourceFileName, ejbJarXml).initialize();
+ this.ejbJar = new EjbJarArtifactDescriptor(declaringClass, beansXmlSourceFileName, ejbJarXml, persistenceXml).initialize();
this.war = new WarArtifactDescriptor(declaringClass, null)
{
@@ -129,11 +131,16 @@
{
for (ResourceDescriptor resource : new HashSet<ResourceDescriptor>(getResources()))
{
- if (resource.getName().startsWith("war"))
+ if (resource.getName().startsWith(WAR_RESOURCE_PREFIX))
{
getResources().remove(resource);
- war.getResources().add(new ResourceDescriptorImpl(resource.getName().substring(3), resource.getSource()));
+ war.getResources().add(new ResourceDescriptorImpl(resource.getName().substring(WAR_RESOURCE_PREFIX.length()), resource.getSource()));
}
+ else if (resource.getName().startsWith(EJB_JAR_RESOURCE_PREFIX))
+ {
+ getResources().remove(resource);
+ ejbJar.getResources().add(new ResourceDescriptorImpl(resource.getName().substring(EJB_JAR_RESOURCE_PREFIX.length()), resource.getSource()));
+ }
}
getResources().add(new ResourceDescriptorImpl(war.getDefaultName(), war.getJar()));
getResources().add(new ResourceDescriptorImpl(ejbJar.getDefaultName(), ejbJar.getJar()));
Modified: test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EjbJarArtifactDescriptor.java
===================================================================
--- test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EjbJarArtifactDescriptor.java 2009-04-25 17:25:09 UTC (rev 2625)
+++ test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/EjbJarArtifactDescriptor.java 2009-04-25 17:31:47 UTC (rev 2626)
@@ -12,13 +12,19 @@
public static final String EJB_JAR_XML_DESTINATION = "META-INF/ejb-jar.xml";
public static final String STANDARD_EJB_JAR_XML_FILE_NAME = "org/jboss/testharness/impl/packaging/ear/ejb-jar.xml";
public static final String CUSTOM_EJB_JAR_XML_FILE_NAME = "org/jboss/testharness/impl/packaging/ear/custom-ejb-jar.xml";
+
+ public static final String PERSISTENCE_XML_DESTINATION = "META-INF/persistence.xml";
+ public static final String STANDARD_PERSISTENCE_XML_FILE_NAME = "org/jboss/testharness/impl/packaging/ear/persistence.xml";
+ public static final String CUSTOM_PERSISTENCE_XML_FILE_NAME = "org/jboss/testharness/impl/packaging/ear/custom-persistence.xml";
private final String ejbJarXml;
+ private final String persistenceXml;
- public EjbJarArtifactDescriptor(Class<?> declaringClass, String beansXmlSourceFileName, String ejbJarXml)
+ public EjbJarArtifactDescriptor(Class<?> declaringClass, String beansXmlSourceFileName, String ejbJarXml, String persistenceXml)
{
super(declaringClass, beansXmlSourceFileName);
this.ejbJarXml = ejbJarXml;
+ this.persistenceXml = persistenceXml;
}
@Override
@@ -31,13 +37,27 @@
}
else
{
- URL ejbJarXml = loadResource(CUSTOM_EJB_JAR_XML_FILE_NAME);
- if (ejbJarXml == null)
+ URL ejbJarXmlLocation = loadResource(CUSTOM_EJB_JAR_XML_FILE_NAME);
+ if (ejbJarXmlLocation == null)
{
- ejbJarXml = loadResource(STANDARD_EJB_JAR_XML_FILE_NAME);
+ ejbJarXmlLocation = loadResource(STANDARD_EJB_JAR_XML_FILE_NAME);
}
- getResources().add(new ResourceDescriptorImpl(EJB_JAR_XML_DESTINATION, ejbJarXml));
+ getResources().add(new ResourceDescriptorImpl(EJB_JAR_XML_DESTINATION, ejbJarXmlLocation));
}
+
+ if (persistenceXml != null)
+ {
+ getResources().add(new ResourceDescriptorImpl(PERSISTENCE_XML_DESTINATION, persistenceXml));
+ }
+ else
+ {
+ URL persistenceXmlLocation = loadResource(CUSTOM_PERSISTENCE_XML_FILE_NAME);
+ if (persistenceXmlLocation == null)
+ {
+ persistenceXmlLocation = loadResource(STANDARD_PERSISTENCE_XML_FILE_NAME);
+ }
+ getResources().add(new ResourceDescriptorImpl(PERSISTENCE_XML_DESTINATION, persistenceXmlLocation));
+ }
return this;
}
Added: test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/PersistenceXml.java
===================================================================
--- test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/PersistenceXml.java (rev 0)
+++ test-harness/trunk/impl/src/main/java/org/jboss/testharness/impl/packaging/ear/PersistenceXml.java 2009-04-25 17:31:47 UTC (rev 2626)
@@ -0,0 +1,32 @@
+package org.jboss.testharness.impl.packaging.ear;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import org.jboss.testharness.impl.packaging.Resource;
+
+/**
+ * Override the default META-INF/persistence.xml
+ *
+ * @see Resource
+ *
+ * @author Dan Allen
+ *
+ */
+@Documented
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface PersistenceXml
+{
+
+ /**
+ * Location of the overriding file, relative to the current location or the
+ * root this classpath if beginning with a '/'.
+ */
+ String value();
+
+}
Added: test-harness/trunk/tests/src/test/java/org/jboss/testharness/impl/packaging/ear/persistence.xml
===================================================================
--- test-harness/trunk/tests/src/test/java/org/jboss/testharness/impl/packaging/ear/persistence.xml (rev 0)
+++ test-harness/trunk/tests/src/test/java/org/jboss/testharness/impl/packaging/ear/persistence.xml 2009-04-25 17:31:47 UTC (rev 2626)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+</persistence>
Modified: test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/descriptors/ear/EarArtifactTest.java
===================================================================
--- test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/descriptors/ear/EarArtifactTest.java 2009-04-25 17:25:09 UTC (rev 2625)
+++ test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/descriptors/ear/EarArtifactTest.java 2009-04-25 17:31:47 UTC (rev 2626)
@@ -10,6 +10,7 @@
import java.util.jar.JarInputStream;
import org.jboss.testharness.AbstractTest;
+import org.jboss.testharness.impl.packaging.ResourceDescriptorImpl;
import org.jboss.testharness.impl.packaging.ear.EarArtifactDescriptor;
import org.jboss.testharness.test.impl.packaging.AbstractArtifactTest;
import org.testng.annotations.Test;
@@ -19,7 +20,7 @@
@Test
public void testDefaultEar() throws Exception
{
- EarArtifactDescriptor ear = new EarArtifactDescriptor(DummyTest.class, null, null).initialize();
+ EarArtifactDescriptor ear = new EarArtifactDescriptor(DummyTest.class, null, null, null).initialize();
ear.getClasses().add(Cow.class);
File root = ear.getExplodedJar();
assert root.isDirectory();
@@ -80,6 +81,10 @@
File ejbJarXml = new File(ejbJarRoot, "META-INF/ejb-jar.xml");
assert ejbJarXml.isFile();
assert ejbJarXml.length() > 0;
+
+ File persistenceXml = new File(ejbJarRoot, "META-INF/persistence.xml");
+ assert persistenceXml.isFile();
+ assert persistenceXml.length() > 0;
File webbeansXml = new File(ejbJarRoot, "META-INF/beans.xml");
assert webbeansXml.isFile();
@@ -117,8 +122,10 @@
@Test
public void testJarProduction() throws Exception
{
- EarArtifactDescriptor ear = new EarArtifactDescriptor(DummyTest.class, null, null).initialize();
+ EarArtifactDescriptor ear = new EarArtifactDescriptor(DummyTest.class, null, null, null).initialize();
ear.getClasses().add(Cow.class);
+ ear.getResources().add(new ResourceDescriptorImpl("dummy-ds.xml", asAbsolutePath(DummyTest.class, "dummy-ds.xml")));
+ ear.getResources().add(new ResourceDescriptorImpl("ejb-jar:/import.sql", asAbsolutePath(DummyTest.class, "import.sql")));
JarInputStream is = new JarInputStream(ear.getJarAsStream());
JarEntry entry;
List<String> fileNames = new ArrayList<String>();
@@ -130,6 +137,7 @@
assert fileNames.contains("META-INF/application.xml");
assert fileNames.contains("META-INF/jboss-test-harness.properties");
assert fileNames.contains("lib/jboss-test-harness.jar");
+ assert fileNames.contains("dummy-ds.xml");
assert fileNames.contains(DummyTest.class.getName() + ".jar");
assert fileNames.contains(DummyTest.class.getName() + ".war");
@@ -146,9 +154,23 @@
}
is.close();
assert fileNames.contains("META-INF/ejb-jar.xml");
+ assert fileNames.contains("META-INF/persistence.xml");
assert fileNames.contains("META-INF/beans.xml");
assert fileNames.contains("org/jboss/testharness/test/impl/packaging/descriptors/ear/Cow.class");
+ assert fileNames.contains("import.sql");
}
+ private String asAbsolutePath(Class clazz, String path)
+ {
+ if (path.startsWith("/"))
+ {
+ return path.substring(1);
+ }
+ else
+ {
+ return clazz.getPackage().getName().replace(".", "/") + "/" + path;
+ }
+ }
+
}
Added: test-harness/trunk/tests/src/test/resources/org/jboss/testharness/impl/packaging/ear/persistence.xml
===================================================================
--- test-harness/trunk/tests/src/test/resources/org/jboss/testharness/impl/packaging/ear/persistence.xml (rev 0)
+++ test-harness/trunk/tests/src/test/resources/org/jboss/testharness/impl/packaging/ear/persistence.xml 2009-04-25 17:31:47 UTC (rev 2626)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+</persistence>
Added: test-harness/trunk/tests/src/test/resources/org/jboss/testharness/test/impl/packaging/descriptors/ear/dummy-ds.xml
===================================================================
--- test-harness/trunk/tests/src/test/resources/org/jboss/testharness/test/impl/packaging/descriptors/ear/dummy-ds.xml (rev 0)
+++ test-harness/trunk/tests/src/test/resources/org/jboss/testharness/test/impl/packaging/descriptors/ear/dummy-ds.xml 2009-04-25 17:31:47 UTC (rev 2626)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE datasources PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+</datasources>
Added: test-harness/trunk/tests/src/test/resources/org/jboss/testharness/test/impl/packaging/descriptors/ear/import.sql
===================================================================
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2625 - ri/trunk/version-matrix.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-25 13:25:09 -0400 (Sat, 25 Apr 2009)
New Revision: 2625
Modified:
ri/trunk/version-matrix/pom.xml
Log:
add tomcat and jetty plugin versions
Modified: ri/trunk/version-matrix/pom.xml
===================================================================
--- ri/trunk/version-matrix/pom.xml 2009-04-25 13:03:04 UTC (rev 2624)
+++ ri/trunk/version-matrix/pom.xml 2009-04-25 17:25:09 UTC (rev 2625)
@@ -494,6 +494,16 @@
<version>1.0-alpha-1</version>
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>tomcat-maven-plugin</artifactId>
+ <version>1.0-beta-1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.16</version>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0-alpha-4</version>
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2624 - in tck/trunk/impl/src/main: resources/org/jboss/jsr299/tck/tests/xml/annotationtypes and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-04-25 09:03:04 -0400 (Sat, 25 Apr 2009)
New Revision: 2624
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Order.java
Modified:
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml
Log:
Cleanup of unused bean in AnnotationTypesTest.
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Order.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Order.java 2009-04-25 12:54:51 UTC (rev 2623)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Order.java 2009-04-25 13:03:04 UTC (rev 2624)
@@ -1,28 +0,0 @@
-package org.jboss.jsr299.tck.tests.xml.annotationtypes;
-
-import javax.context.Dependent;
-import javax.inject.Current;
-import javax.inject.Initializer;
-import javax.inject.manager.Manager;
-
-//@TestBindingType
-//@TestInterceptorBindingType
-//@TestStereotype
-class Order
-{
- private boolean active;
-
- @Initializer
- public Order(@Current Manager manager)
- {
- if (manager.getContext(Dependent.class).isActive())
- {
- active = true;
- }
- }
-
- public boolean isActive()
- {
- return active;
- }
-}
Modified: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml 2009-04-25 12:54:51 UTC (rev 2623)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml 2009-04-25 13:03:04 UTC (rev 2624)
@@ -35,14 +35,6 @@
</dd:InterceptorType2>
-->
<!--
- <dd:Order>
- <dd:TestBindingType />
- <dd:TestInterceptorBindingType />
- <dd:TestStereotype />
- <manager:Manager />
- </dd:Order>
- -->
- <!--
*** Uncomment once WBRI-244 is fixed. ***
<dd:BeanWithBindingAnnotation>
<dd:TestBindingType />
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2623 - in tck/trunk/impl/src/main: resources/org/jboss/jsr299/tck/tests/xml/annotationtypes and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-04-25 08:54:51 -0400 (Sat, 25 Apr 2009)
New Revision: 2623
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestBindingType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestInterceptorBindingType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherInterceptorBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBindingAnnotation.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithInterceptorBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InheritedInterceptorTestBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor1.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor2.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorRecorder.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType1.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType2.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Order.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestBindingType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestInterceptorBindingType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestNamed.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestScopeType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestStereotype.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnnotationTypesTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml
Log:
Changes for tests related to the defining binding types, interceptor binding types, and stereotypes in XML
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnnotationTypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnnotationTypesTest.java 2009-04-24 01:09:57 UTC (rev 2622)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnnotationTypesTest.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -1,53 +1,123 @@
package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+import javax.context.RequestScoped;
+import javax.inject.AnnotationLiteral;
+import javax.inject.manager.Bean;
+
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.AnotherTestInterceptorBindingType;
-import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.TestBindingType;
-import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.TestDeploymentType;
-import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.TestInterceptorBindingType;
-import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.TestNamed;
-import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.TestScopeType;
-import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.TestStereotype;
-import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.Order;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
@Artifact
-@Classes({
- Order.class,
- TestBindingType.class,
- TestInterceptorBindingType.class,
- TestStereotype.class,
- AnotherTestInterceptorBindingType.class,
- TestScopeType.class,
- TestDeploymentType.class,
- TestNamed.class})
@BeansXml("beans.xml")
public class AnnotationTypesTest extends AbstractJSR299Test
{
- @Test
+ @Test(groups = { "stub", "xml" })
@SpecAssertions({
- @SpecAssertion(section="9", id="d"),//without schema
- @SpecAssertion(section="9.4", id="a"),
- @SpecAssertion(section="9.4", id="b"),
+ @SpecAssertion(section="9", id="d")//without schema
+ })
+ public void testXMLSchemaUse()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "ri-broken", "xml" })
+ @SpecAssertions({
+ @SpecAssertion(section="9.4", id="a")
+ })
+ public void testBindingTypeFromXML()
+ {
+ //TODO The binding type appears as a non-binding annotation in the call to resolveByType()
+ assert getCurrentManager().resolveByType(BeanWithBinding.class, new AnnotationLiteral<TestBindingType>(){}).size() > 0;
+ }
+
+ @Test(groups = { "ri-broken", "xml" })
+ @SpecAssertions({
+ @SpecAssertion(section="9.4", id="b")
+ })
+ public void testInterceptorBindingTypeFromXML()
+ {
+ BeanWithInterceptorBinding bean = getCurrentManager().getInstanceByType(BeanWithInterceptorBinding.class);
+ assert bean != null : "Test bean not resolvable";
+ Object returnValue = bean.getInterceptor();
+ //TODO Bean method is not currently being intercepted due to lack of interceptor support in the RI
+ assert returnValue != null : "Bean method was not intercepted";
+ assert returnValue instanceof TestInterceptor : "Incorrect return type";
+ }
+
+ @Test(groups = { "ri-broken", "xml" })
+ @SpecAssertions({
@SpecAssertion(section="9.4", id="c"),
- @SpecAssertion(section="9.4", id="e"),
- @SpecAssertion(section="9.4", id="f"),
- @SpecAssertion(section="9.4", id="g"),
@SpecAssertion(section="9.4.1", id="a"),
@SpecAssertion(section="9.4.1", id="d"),
@SpecAssertion(section="9.4.1", id="e"),
@SpecAssertion(section="9.4.1", id="f"),
- @SpecAssertion(section="9.4.1", id="g"),
+ @SpecAssertion(section="9.4.1", id="g")
+ })
+ public void testStereotypeFromXML()
+ {
+ //TODO The stereotype is not being applied to this bean
+ Bean<BeanWithStereotype> bean = getCurrentManager().resolveByType(BeanWithStereotype.class).iterator().next();
+ assert TestScopeType.class.isAssignableFrom(bean.getScopeType());
+ assert TestDeploymentType.class.isAssignableFrom(bean.getDeploymentType());
+ assert bean.getName() != null : "No default name for bean";
+ assert "beanWithStereotype".equals(bean.getName()) : "Incorrect name for bean";
+
+ // Now check that the correct interceptor is also being applied through the
+ // stereotype.
+ BeanWithStereotype beanWithStereotype = (BeanWithStereotype) getCurrentManager().getInstanceByName("beanWithStereotype");
+ Object interceptor = beanWithStereotype.getInterceptor();
+ assert interceptor != null : "Bean method was not intercepted";
+ assert interceptor instanceof AnotherTestInterceptor : "Incorrect return type";
+ }
+
+ @Test(groups = { "ri-broken", "xml" })
+ @SpecAssertions({
+ @SpecAssertion(section="9.4", id="e")
+ })
+ public void testBindingAnnotationOverridenByXML()
+ {
+ assert getCurrentManager().getInstanceByType(BeanWithBindingAnnotation.class, new AnnotationLiteral<TestBindingType>(){}) != null;
+ }
+
+ @Test(groups = { "ri-broken", "xml" })
+ @SpecAssertions({
+ @SpecAssertion(section="9.4", id="f")
+ })
+ public void testInterceptorBindingAnnotationOverridenByXML()
+ {
+ BeanWithAnotherInterceptorBinding bean = getCurrentManager().getInstanceByType(BeanWithAnotherInterceptorBinding.class);
+ assert bean != null : "Test bean not resolvable";
+ Object returnValue = bean.getInterceptor();
+ //TODO Bean method is not currently being intercepted due to lack of interceptor support in the RI
+ assert returnValue != null : "Bean method was not intercepted";
+ assert returnValue instanceof TestInterceptor : "Incorrect return type";
+ }
+
+ @Test(groups = { "ri-broken", "xml" })
+ @SpecAssertions({
+ @SpecAssertion(section="9.4", id="g")
+ })
+ public void testStereotypeAnnotationOverridenByXML()
+ {
+ //TODO The stereotype is not being applied to this bean
+ Bean<BeanWithAnotherStereotype> bean = getCurrentManager().resolveByType(BeanWithAnotherStereotype.class).iterator().next();
+ assert RequestScoped.class.isAssignableFrom(bean.getScopeType());
+ }
+
+ @Test(groups = { "ri-broken", "xml" })
+ @SpecAssertions({
@SpecAssertion(section="9.4.2", id="a"),
@SpecAssertion(section="9.4.2", id="d")
})
- public void testAnnotationTypes()
+ public void testInheritedInterceptorsFromXML()
{
- assert getCurrentManager().resolveByType(Order.class).size() == 1;
+ InheritedInterceptorTestBean bean = getCurrentManager().getInstanceByType(InheritedInterceptorTestBean.class);
+ InterceptorRecorder interceptorRecorder = bean.getInterceptors();
+ assert interceptorRecorder.containsInterceptor(InterceptorType1.class);
+ assert interceptorRecorder.containsInterceptor(InterceptorType2.class);
}
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestBindingType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestBindingType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestBindingType.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Retention(RUNTIME)
+@Target({TYPE, METHOD, FIELD, PARAMETER})
+@BindingType
+@interface AnotherTestBindingType
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestBindingType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestInterceptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestInterceptor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestInterceptor.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@TestInterceptorBindingType @Interceptor
+class AnotherTestInterceptor
+{
+ @AroundInvoke public Object alwaysReturnThis(InvocationContext ctx)
+ {
+ return this;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestInterceptor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestInterceptorBindingType.java (from rev 2614, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/AnotherTestInterceptorBindingType.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestInterceptorBindingType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestInterceptorBindingType.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import javax.interceptor.InterceptorBindingType;
+
+@InterceptorBindingType
+@interface AnotherTestInterceptorBindingType
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestStereotype.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.annotation.Stereotype;
+
+@Retention(RUNTIME)
+@Target(TYPE)
+@Stereotype
+@interface AnotherTestStereotype
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnotherTestStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherInterceptorBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherInterceptorBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherInterceptorBinding.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+@AnotherTestInterceptorBindingType
+class BeanWithAnotherInterceptorBinding
+{
+ public Object getInterceptor()
+ {
+ return null;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherInterceptorBinding.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherStereotype.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+@AnotherTestStereotype
+class BeanWithAnotherStereotype
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithAnotherStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBinding.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+@TestBindingType
+class BeanWithBinding
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBinding.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBindingAnnotation.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBindingAnnotation.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBindingAnnotation.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+@AnotherTestBindingType
+class BeanWithBindingAnnotation
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithBindingAnnotation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithInterceptorBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithInterceptorBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithInterceptorBinding.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+@TestInterceptorBindingType
+class BeanWithInterceptorBinding
+{
+ public Object getInterceptor()
+ {
+ return null;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithInterceptorBinding.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithStereotype.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+@TestStereotype
+class BeanWithStereotype
+{
+
+ public Object getInterceptor()
+ {
+ return null;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/BeanWithStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InheritedInterceptorTestBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InheritedInterceptorTestBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InheritedInterceptorTestBean.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+@InterceptorType2
+class InheritedInterceptorTestBean
+{
+ public InterceptorRecorder getInterceptors()
+ {
+ return new InterceptorRecorder();
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InheritedInterceptorTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor1.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor1.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor1.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+@InterceptorType1
+class Interceptor1
+{
+ @AroundInvoke public Object alwaysReturnThis(InvocationContext ctx)
+ {
+ InterceptorRecorder interceptorRecorder = null;
+ try
+ {
+ interceptorRecorder = (InterceptorRecorder) ctx.proceed();
+ interceptorRecorder.addInterceptor(this);
+ }
+ catch (Exception e)
+ {
+ }
+ return interceptorRecorder;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor2.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor2.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor2.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+@InterceptorType2
+class Interceptor2
+{
+ @AroundInvoke public Object alwaysReturnThis(InvocationContext ctx)
+ {
+ InterceptorRecorder interceptorRecorder = null;
+ try
+ {
+ interceptorRecorder = (InterceptorRecorder) ctx.proceed();
+ interceptorRecorder.addInterceptor(this);
+ }
+ catch (Exception e)
+ {
+ }
+ return interceptorRecorder;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Interceptor2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorRecorder.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorRecorder.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorRecorder.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+
+/**
+ * Records each interceptor that is invoked. Each of the interceptors
+ * must actually make use of this.
+ *
+ * @author David Allen
+ *
+ */
+class InterceptorRecorder
+{
+ private ArrayList<Object> interceptors = new ArrayList<Object>();
+
+ public void addInterceptor(Object interceptor)
+ {
+ interceptors.add(interceptor);
+ }
+
+ public boolean containsInterceptor(Class<? extends Annotation> interceptorAnnotationClass)
+ {
+ boolean result = false;
+ for (Object interceptor : interceptors)
+ {
+ if (interceptorAnnotationClass.isAssignableFrom(interceptor.getClass()))
+ {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorRecorder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType1.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType1.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType1.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface InterceptorType1
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType2.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType2.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType2.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface InterceptorType2
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/InterceptorType2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Order.java (from rev 2614, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/Order.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Order.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/Order.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,28 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import javax.context.Dependent;
+import javax.inject.Current;
+import javax.inject.Initializer;
+import javax.inject.manager.Manager;
+
+//@TestBindingType
+//@TestInterceptorBindingType
+//@TestStereotype
+class Order
+{
+ private boolean active;
+
+ @Initializer
+ public Order(@Current Manager manager)
+ {
+ if (manager.getContext(Dependent.class).isActive())
+ {
+ active = true;
+ }
+ }
+
+ public boolean isActive()
+ {
+ return active;
+ }
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestBindingType.java (from rev 2614, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestBindingType.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestBindingType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestBindingType.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Retention(RUNTIME)
+@Target({TYPE, METHOD, FIELD, PARAMETER})
+@interface TestBindingType
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestDeploymentType.java (from rev 2614, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestDeploymentType.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestDeploymentType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestDeploymentType.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import javax.inject.DeploymentType;
+
+@DeploymentType
+public @interface TestDeploymentType
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestInterceptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestInterceptor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestInterceptor.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@TestInterceptorBindingType @Interceptor
+class TestInterceptor
+{
+ @AroundInvoke public Object alwaysReturnThis(InvocationContext ctx)
+ {
+ return this;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestInterceptor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestInterceptorBindingType.java (from rev 2614, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestInterceptorBindingType.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestInterceptorBindingType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestInterceptorBindingType.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface TestInterceptorBindingType
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestNamed.java (from rev 2614, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestNamed.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestNamed.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestNamed.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import javax.annotation.Named;
+
+@Named
+public @interface TestNamed
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestScopeType.java (from rev 2614, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestScopeType.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestScopeType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestScopeType.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import javax.context.ScopeType;
+
+@ScopeType
+public @interface TestScopeType
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestStereotype.java (from rev 2614, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestStereotype.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/TestStereotype.java 2009-04-25 12:54:51 UTC (rev 2623)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Retention(RUNTIME)
+@Target(TYPE)
+@interface TestStereotype
+{
+
+}
Modified: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml 2009-04-24 01:09:57 UTC (rev 2622)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml 2009-04-25 12:54:51 UTC (rev 2623)
@@ -1,13 +1,18 @@
<Beans xmlns="urn:java:ee"
- xmlns:dd="urn:java:org.jboss.jsr299.tck.tests.xml.annotationtypes.foo"
+ xmlns:dd="urn:java:org.jboss.jsr299.tck.tests.xml.annotationtypes"
xmlns:manager="urn:java:javax.inject.manager">
<dd:TestBindingType>
<BindingType />
</dd:TestBindingType>
+ <dd:AnotherTestBindingType>
+ <BindingType />
+ </dd:AnotherTestBindingType>
<dd:TestInterceptorBindingType>
<InterceptorBindingType />
- <dd:AnotherTestInterceptorBindingType />
</dd:TestInterceptorBindingType>
+ <dd:AnotherTestInterceptorBindingType>
+ <InterceptorBindingType />
+ </dd:AnotherTestInterceptorBindingType>
<dd:TestStereotype>
<Stereotype />
<dd:TestScopeType />
@@ -15,10 +20,35 @@
<dd:AnotherTestInterceptorBindingType />
<dd:TestNamed />
</dd:TestStereotype>
+ <dd:AnotherTestStereotype>
+ <Stereotype />
+ <RequestScoped />
+ </dd:AnotherTestStereotype>
+ <!--
+ *** Uncomment once WBRI-252 is fixed. ***
+ <dd:InterceptorType1>
+ <InterceptorBindingType />
+ </dd:InterceptorType1>
+ <dd:InterceptorType2>
+ <InterceptorBindingType />
+ <dd:InterceptorType1 />
+ </dd:InterceptorType2>
+ -->
+ <!--
<dd:Order>
<dd:TestBindingType />
<dd:TestInterceptorBindingType />
<dd:TestStereotype />
<manager:Manager />
</dd:Order>
+ -->
+ <!--
+ *** Uncomment once WBRI-244 is fixed. ***
+ <dd:BeanWithBindingAnnotation>
+ <dd:TestBindingType />
+ </dd:BeanWithBindingAnnotation>
+ -->
+ <dd:BeanWithAnotherStereotype>
+ <dd:AnotherTestStereotype />
+ </dd:BeanWithAnotherStereotype>
</Beans>
\ No newline at end of file
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2622 - examples/trunk.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-23 21:09:57 -0400 (Thu, 23 Apr 2009)
New Revision: 2622
Modified:
examples/trunk/pom.xml
Log:
reflect change to tomcat example
Modified: examples/trunk/pom.xml
===================================================================
--- examples/trunk/pom.xml 2009-04-24 01:08:54 UTC (rev 2621)
+++ examples/trunk/pom.xml 2009-04-24 01:09:57 UTC (rev 2622)
@@ -73,11 +73,11 @@
<modules>
<module>numberguess</module>
<module>jsf2</module>
- <module>tomcat</module>
<module>translator</module>
<module>login</module>
<module>conversations</module>
<module>se/numberguess</module>
+ <module>servlet-numberguess</module>
<module>wicket/numberguess</module>
<module>wicket/conversations</module>
</modules>
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2621 - examples/trunk.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-23 21:08:54 -0400 (Thu, 23 Apr 2009)
New Revision: 2621
Added:
examples/trunk/servlet-numberguess/
Removed:
examples/trunk/tomcat/
Log:
rename to reflect support for Jetty and to be clear about example name
Copied: examples/trunk/servlet-numberguess (from rev 2620, examples/trunk/tomcat)
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2620 - in examples/trunk/tomcat: WebContent/META-INF and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-23 21:05:09 -0400 (Thu, 23 Apr 2009)
New Revision: 2620
Added:
examples/trunk/tomcat/readme.txt
Modified:
examples/trunk/tomcat/WebContent/META-INF/context.xml
examples/trunk/tomcat/WebContent/WEB-INF/
examples/trunk/tomcat/pom.xml
Log:
add support for embedded Jetty, embedded Tomcat and standalone Tomcat
add instructions for doing Maven-based deployments
add configuration to prevent Tomcat from saving sessions across restarts
Modified: examples/trunk/tomcat/WebContent/META-INF/context.xml
===================================================================
--- examples/trunk/tomcat/WebContent/META-INF/context.xml 2009-04-24 00:37:22 UTC (rev 2619)
+++ examples/trunk/tomcat/WebContent/META-INF/context.xml 2009-04-24 01:05:09 UTC (rev 2620)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context>
+ <Manager pathname=""/> <!-- disables storage of sessions across restarts -->
<Resource name="app/Manager"
auth="Container"
type="javax.inject.manager.Manager"
Property changes on: examples/trunk/tomcat/WebContent/WEB-INF
___________________________________________________________________
Name: svn:ignore
+ classes
lib
Modified: examples/trunk/tomcat/pom.xml
===================================================================
--- examples/trunk/tomcat/pom.xml 2009-04-24 00:37:22 UTC (rev 2619)
+++ examples/trunk/tomcat/pom.xml 2009-04-24 01:05:09 UTC (rev 2620)
@@ -8,21 +8,105 @@
<version>1.0.0-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.webbeans.examples</groupId>
- <artifactId>webbeans-numberguess-tomcat</artifactId>
+ <artifactId>webbeans-servlet-numberguess</artifactId>
<packaging>war</packaging>
- <name>Web Beans Examples: Numberguess</name>
+ <name>Web Beans Numberguess Example (Servlet)</name>
+ <description>The Web Beans numberguess example for deployment to a servlet container</description>
<pluginRepositories>
- <pluginRepository>
- <id>codehaus snapshot repository</id>
- <url>http://snapshots.repository.codehaus.org/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
+ <pluginRepository>
+ <id>codehaus snapshot repository</id>
+ <url>http://snapshots.repository.codehaus.org/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <failOnError>false</failOnError>
+ <filesets>
+ <fileset>
+ <!-- clean up files from war:inplace -->
+ <directory>WebContent</directory>
+ <includes>
+ <include>WEB-INF/classes/**</include>
+ <include>WEB-INF/lib/**</include>
+ </includes>
+ <followSymlinks>false</followSymlinks>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <!-- don't stage or package files added to src/main/webapp by war:inplace -->
+ <warSourceExcludes>WEB-INF/classes/**,WEB-INF/lib/**</warSourceExcludes>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>tomcat-maven-plugin</artifactId>
+ <configuration>
+ <path>/${project.build.finalName}</path>
+ <!-- uncomment to use server configuration override; see readme.txt for details -->
+ <!--<server>tomcat</server>-->
+ <url>http://localhost:${tomcat.http.port}/manager</url>
+ <port>${embedded-tomcat.http.port}</port> <!-- port for embedded Tomcat only (putting this configuration in the execution for the run goal doesn't work) -->
+ <warSourceDirectory>WebContent</warSourceDirectory>
+ <!-- if you don't want to use war:inplace, use this path instead -->
+ <!--
+ <warSourceDirectory>${project.build.directory}/${project.build.finalName}</warSourceDirectory>
+ -->
+ </configuration>
+ <dependencies>
+ </dependencies>
+ </plugin>
+
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <configuration>
+ <connectors>
+ <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>${jetty.http.port}</port>
+ <maxIdleTime>3600000</maxIdleTime>
+ </connector>
+ </connectors>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <webAppConfig>
+ <contextPath>/${project.build.finalName}</contextPath>
+ </webAppConfig>
+ <webAppSourceDirectory>WebContent</webAppSourceDirectory>
+ <!-- if you don't want to use war:inplace, use this path instead -->
+ <!--
+ <webAppSourceDirectory>${project.build.directory}/${project.build.finalName}</webAppSourceDirectory>
+ -->
+ </configuration>
+ <dependencies>
+ </dependencies>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <properties>
+ <jetty.http.port>9090</jetty.http.port>
+ <jetty.debug.port>9190</jetty.debug.port>
+ <tomcat.http.port>8080</tomcat.http.port>
+ <embedded-tomcat.http.port>9090</embedded-tomcat.http.port>
+ <embedded-tomcat.debug.port>9190</embedded-tomcat.debug.port>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.testng</groupId>
@@ -60,17 +144,6 @@
<scope>runtime</scope>
</dependency>
- <!-- <dependency>
- <groupId>org.jboss.el</groupId>
- <artifactId>jboss-el</artifactId>
- <exclusions>
- <exclusion>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>-->
-
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-ri</artifactId>
@@ -89,10 +162,5 @@
</dependency>
</dependencies>
-
- <build>
- <finalName>webbeans-numberguess</finalName>
- </build>
-
+
</project>
-
Added: examples/trunk/tomcat/readme.txt
===================================================================
--- examples/trunk/tomcat/readme.txt (rev 0)
+++ examples/trunk/tomcat/readme.txt 2009-04-24 01:05:09 UTC (rev 2620)
@@ -0,0 +1,77 @@
+Web Beans Numberguess Example (Servlet Container)
+=================================================
+
+This example demonstrates the use of Web Beans in a Servlet container
+environment (Tomcat 6 / Jetty 6). No alterations are expected to be made to the
+Servlet container. All services are self-contained within the deployment.
+
+This example uses a Maven 2 build. Execute the following command to build the
+WAR. The WAR will will be located in the target directory after completion of
+the build.
+
+ mvn
+
+Now you are ready to deploy.
+
+== Deploying with an embedded servlet container
+
+Run this command to execute the application in an embedded Jetty 6 container:
+
+ mvn war:inplace jetty:run
+
+You can also execute the application in an embedded Tomcat 6 container:
+
+ mvn war:inplace tomcat:run
+
+In both cases, any changes to assets in WebContent take affect immediately. If
+a change to a webapp configuration file is made, the application may
+automatically redeploy. The redeploy behavior can be fined tuned in the plugin
+configuration (at least for Jetty). If you make a change to a classpath
+resource, you need to execute a build:
+
+ mvn compile war:inplace
+
+Note that war:inplace copies the compiled classes and JARs inside WebContent,
+under WEB-INF/classes and WEB-INF/lib, respectively, mixing source and compiled
+files. However, the build does work around these temporary files by excluding
+them from the packaged WAR and cleaning them during the Maven clean phase.
+These folders are also ignored by SVN.
+
+== Deploying to standalone Tomcat
+
+If you want to run the application on a standalone Tomcat 6, first download and
+extract Tomcat 6. This build assumes you will be running Tomcat in its default
+configuration, with a hostname of localhost and port 8080. Before starting
+Tomcat, add the following line to conf/tomcat-users.xml to allow the Maven
+Tomcat plugin to access the manager application, then start Tomcat:
+
+ <user username="admin" password="" roles="manager"/>
+
+To override this username and password, add a <server> with id tomcat in your
+Maven 2 settings.xml file, set the <username> and <password> elements to the
+appropriate values and uncomment the <server> element inside the
+tomcat-maven-plugin configuration in the pom.xml.
+
+You can deploy the packaged archive to Tomcat via HTTP PUT using this command:
+
+ mvn package tomcat:deploy
+
+Then you use this command to undeploy the application:
+
+ mvn tomcat:undeploy
+
+Instead of packaging the WAR, you can deploy it as an exploded archive
+immediately after the war goal is finished assembling the exploded structure:
+
+ mvn compile war:exploded tomcat:exploded
+
+Once the application is deployed, you can redeploy it using the following command:
+
+ mvn tomcat:redeploy
+
+But likely you want to run one or more build goals first before you redeploy:
+
+ mvn compile tomcat:redeploy
+ mvn war:exploded tomcat:redeploy
+ mvn compile war:exploded tomcat:redeploy
+
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2619 - in examples/trunk/tomcat/WebContent: WEB-INF and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-23 20:37:22 -0400 (Thu, 23 Apr 2009)
New Revision: 2619
Modified:
examples/trunk/tomcat/WebContent/META-INF/context.xml
examples/trunk/tomcat/WebContent/WEB-INF/faces-config.xml
examples/trunk/tomcat/WebContent/WEB-INF/web.xml
Log:
formatting and whitespace
Modified: examples/trunk/tomcat/WebContent/META-INF/context.xml
===================================================================
--- examples/trunk/tomcat/WebContent/META-INF/context.xml 2009-04-24 00:37:10 UTC (rev 2618)
+++ examples/trunk/tomcat/WebContent/META-INF/context.xml 2009-04-24 00:37:22 UTC (rev 2619)
@@ -1,9 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
<Context>
- <Resource name="app/Manager" auth="Container"
- type="javax.inject.manager.Manager"
- factory="org.jboss.webbeans.resources.ManagerObjectFactory"/>
-<!-- Uncomment to enable injection into Servlet -->
-<!-- <Listener className="org.jboss.webbeans.environment.tomcat.WebBeansLifecycleListener" />-->
-
-
+ <Resource name="app/Manager"
+ auth="Container"
+ type="javax.inject.manager.Manager"
+ factory="org.jboss.webbeans.resources.ManagerObjectFactory"/>
+ <!-- Uncomment to enable injection into Servlet -->
+ <!-- <Listener className="org.jboss.webbeans.environment.tomcat.WebBeansLifecycleListener"/> -->
</Context>
Modified: examples/trunk/tomcat/WebContent/WEB-INF/faces-config.xml
===================================================================
--- examples/trunk/tomcat/WebContent/WEB-INF/faces-config.xml 2009-04-24 00:37:10 UTC (rev 2618)
+++ examples/trunk/tomcat/WebContent/WEB-INF/faces-config.xml 2009-04-24 00:37:22 UTC (rev 2619)
@@ -1,11 +1,11 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<faces-config version="1.2"
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
- <application>
- <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
- </application>
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
</faces-config>
Modified: examples/trunk/tomcat/WebContent/WEB-INF/web.xml
===================================================================
--- examples/trunk/tomcat/WebContent/WEB-INF/web.xml 2009-04-24 00:37:10 UTC (rev 2618)
+++ examples/trunk/tomcat/WebContent/WEB-INF/web.xml 2009-04-24 00:37:22 UTC (rev 2619)
@@ -1,14 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app version="2.5"
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
<display-name>Web Beans Numberguess example</display-name>
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.jboss.webbeans.environment.servlet.Listener</listener-class>
+ </listener>
- <!-- JSF -->
-
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
@@ -19,31 +25,15 @@
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
-
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
<session-config>
<session-timeout>10</session-timeout>
</session-config>
-
- <listener>
- <listener-class>org.jboss.webbeans.environment.servlet.Listener</listener-class>
- </listener>
<resource-env-ref>
- <description>
- Object factory for the JCDI Manager
- </description>
- <resource-env-ref-name>
- app/Manager
- </resource-env-ref-name>
- <resource-env-ref-type>
- javax.inject.manager.Manager
- </resource-env-ref-type>
+ <description>Object factory for the JCDI Manager</description>
+ <resource-env-ref-name>app/Manager</resource-env-ref-name>
+ <resource-env-ref-type>javax.inject.manager.Manager</resource-env-ref-type>
</resource-env-ref>
-
</web-app>
15 years, 8 months