[webbeans-commits] Webbeans SVN: r2047 - doc/trunk/reference/en-US.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-16 13:57:18 -0400 (Mon, 16 Mar 2009)
New Revision: 2047
Modified:
doc/trunk/reference/en-US/Author_Group.xml
Log:
minor
Modified: doc/trunk/reference/en-US/Author_Group.xml
===================================================================
--- doc/trunk/reference/en-US/Author_Group.xml 2009-03-16 16:39:38 UTC (rev 2046)
+++ doc/trunk/reference/en-US/Author_Group.xml 2009-03-16 17:57:18 UTC (rev 2047)
@@ -52,11 +52,12 @@
<surname>Milesi</surname>
<contrib>Italian Translation</contrib>
</othercredit>
- <othercredit>
+ <othercredit>
<firstname>Sean</firstname>
<surname>Wu</surname>
<contrib>Simplified Chinese Translation</contrib>
<affiliation>
<orgname>Kava Community</orgname>
</affiliation>
+ </othercredit>
</authorgroup>
15 years, 10 months
[webbeans-commits] Webbeans SVN: r2046 - tck/trunk/impl.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-16 12:39:38 -0400 (Mon, 16 Mar 2009)
New Revision: 2046
Modified:
tck/trunk/impl/pom.xml
Log:
java5 compat
Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-03-16 14:57:52 UTC (rev 2045)
+++ tck/trunk/impl/pom.xml 2009-03-16 16:39:38 UTC (rev 2046)
@@ -182,8 +182,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.6</source>
- <target>1.6</target>
+ <source>1.5</source>
+ <target>1.5</target>
<compilerArgument>-AauditXml=${basedir}/src/main/resources/tck-audit.xml</compilerArgument>
</configuration>
</plugin>
15 years, 10 months
[webbeans-commits] Webbeans SVN: r2045 - ri/trunk/impl/src/main/java/org/jboss/webbeans/xml.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-16 10:57:52 -0400 (Mon, 16 Mar 2009)
New Revision: 2045
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParserEnvironment.java
Log:
minor
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParserEnvironment.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParserEnvironment.java 2009-03-16 14:56:06 UTC (rev 2044)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParserEnvironment.java 2009-03-16 14:57:52 UTC (rev 2045)
@@ -4,7 +4,6 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
import org.jboss.webbeans.introspector.AnnotatedAnnotation;
import org.jboss.webbeans.introspector.AnnotatedClass;
@@ -17,11 +16,11 @@
private final List<AnnotatedClass<?>> classes;
private final List<AnnotatedAnnotation<?>> annotations;
- private final Set<URL> webBeansXml;
+ private final Iterable<URL> webBeansXml;
private final List<AnnotatedAnnotation<?>> enabledDeploymentTypes;
private final ResourceLoader resourceLoader;
- public XmlParserEnvironment(ResourceLoader resourceLoader, Set<URL> webBeansXml)
+ public XmlParserEnvironment(ResourceLoader resourceLoader, Iterable<URL> webBeansXml)
{
this.classes = new ArrayList<AnnotatedClass<?>>();
this.annotations = new ArrayList<AnnotatedAnnotation<?>>();
@@ -30,7 +29,7 @@
this.resourceLoader = resourceLoader;
}
- public Set<URL> getWebBeansXml()
+ public Iterable<URL> getWebBeansXml()
{
return webBeansXml;
}
15 years, 10 months
[webbeans-commits] Webbeans SVN: r2044 - in ri/trunk/impl/src: main/java/org/jboss/webbeans/bean and 10 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-16 10:56:06 -0400 (Mon, 16 Mar 2009)
New Revision: 2044
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ClassReceiver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ParseXmlHelper.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlConstants.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlParserImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParserEnvironment.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/beans/
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/beans/Order.java
Removed:
ri/trunk/impl/src/main/java/org/jboss/webbeans/xsd/
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/ejb/interceptor/
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedAnnotationImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java
ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml
Log:
Add victor's changes to trunk, add XmlParserEnvironment, start work on support for loading methods, construtors and fields
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-03-16 14:50:01 UTC (rev 2043)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -17,9 +17,7 @@
package org.jboss.webbeans.bean;
-import java.util.Collections;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import javax.annotation.PostConstruct;
@@ -63,8 +61,7 @@
{
// Logger
private static LogProvider log = Logging.getLogProvider(SimpleBean.class);
- // Empty list representing no-args
- private static List<Class<?>> NO_ARGUMENTS = Collections.emptyList();
+
// The constructor
private ConstructorInjectionPoint<T> constructor;
// The post-construct method
@@ -398,10 +395,10 @@
return;
}
- if (getAnnotatedItem().getConstructor(NO_ARGUMENTS) != null)
+ if (getAnnotatedItem().getNoArgsConstructor() != null)
{
- this.constructor = ConstructorInjectionPoint.of(this, getAnnotatedItem().getConstructor(NO_ARGUMENTS));
+ this.constructor = ConstructorInjectionPoint.of(this, getAnnotatedItem().getNoArgsConstructor());
log.trace("Exactly one constructor (" + constructor + ") defined, using it as the bean constructor for " + getType());
return;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-03-16 14:50:01 UTC (rev 2043)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -2,7 +2,9 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.util.Collections;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
import javax.event.Fires;
@@ -44,6 +46,9 @@
public class BeanDeployer
{
+ // Empty list representing no-args
+ private static List<Class<?>> NO_ARGUMENTS = Collections.emptyList();
+
private static final LogProvider log = Logging.getLogProvider(BeanDeployer.class);
private final Set<RIBean<?>> beans;
@@ -272,7 +277,7 @@
private static boolean hasSimpleWebBeanConstructor(AnnotatedClass<?> type)
{
- return type.getConstructor() != null || type.getAnnotatedConstructors(Initializer.class).size() > 0;
+ return type.getNoArgsConstructor() != null || type.getAnnotatedConstructors(Initializer.class).size() > 0;
}
private static <T> AnnotatedMethod<T> realizeProducerMethod(final AnnotatedMethod<T> method, final AnnotatedClass<?> realizingClass)
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java 2009-03-16 14:50:01 UTC (rev 2043)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -43,4 +43,12 @@
*/
public Set<AnnotatedMethod<?>> getAnnotatedMembers(Class<? extends Annotation> annotationType);
+ /**
+ * Get an annotation member by name
+ *
+ * @param memberName
+ * @return
+ */
+ public <A> AnnotatedMethod<A> getMember(String memberName, AnnotatedClass<A> expectedType);
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java 2009-03-16 14:50:01 UTC (rev 2043)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -37,6 +37,16 @@
* @return A set of abstracted fields
*/
public Set<AnnotatedField<?>> getFields();
+
+ /**
+ * Get a field by name
+ *
+ * @param <F> the expected type of the field
+ * @param fieldName the field name
+ * @param expectedType the expected type of the field
+ * @return the field
+ */
+ public <F> AnnotatedField<F> getDeclaredField(String fieldName, AnnotatedClass<F> expectedType);
/**
* Gets all fields which are annotated with the given annotation type on this
@@ -84,15 +94,19 @@
public Set<AnnotatedConstructor<T>> getConstructors();
/**
- * Gets the constructor with arguments given
+ * Gets the no-args constructor
*
- * @param arguments The list of arguments to match
- * @return A set of abstracted constructors with the given arguments. Returns
- * an empty set if there are no matches
+ * @return The no-args constructor, or null if not defined
*/
- public AnnotatedConstructor<T> getConstructor(List<Class<?>> arguments);
+ public AnnotatedConstructor<T> getNoArgsConstructor();
- public AnnotatedConstructor<T> getConstructor(Class<?>... arguments);
+ /**
+ * Get the constructor which matches the argument list provided
+ *
+ * @param parameterTypes the parameters of the constructor
+ * @return the matching constructor, or null if not defined
+ */
+ public AnnotatedConstructor<T> getDeclaredConstructor(List<AnnotatedClass<?>> parameterTypes);
/**
* Gets all methods annotated with annotationType
@@ -117,9 +131,25 @@
*
* @param methodDescriptor
* @return
+ *
+ * TODO Replace with AnnotatedMethod variant
*/
+ @Deprecated
public AnnotatedMethod<?> getMethod(Method method);
+ /**
+ * Get a method by name
+ *
+ * @param <M> the expected return type
+ * @param methodName the name of the method
+ * @param expectedReturnType the expected return type
+ * @param parameterTypes the parameter types of the method
+ * @return the method, or null if it doesn't exist
+ */
+ public <M> AnnotatedMethod<M> getDeclaredMethod(String methodName, AnnotatedClass<M> expectedReturnType, AnnotatedClass<?>... parameterTypes);
+
+ // TODO Replace with AnnotatedMethod variant
+ @Deprecated
public AnnotatedMethod<?> getDeclaredMethod(Method method);
/**
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java 2009-03-16 14:50:01 UTC (rev 2043)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -41,15 +41,10 @@
return delegate().getAnnotatedMethods(annotationType);
}
- public AnnotatedConstructor<T> getConstructor(List<Class<?>> arguments)
+ public AnnotatedConstructor<T> getNoArgsConstructor()
{
- return delegate().getConstructor(arguments);
+ return delegate().getNoArgsConstructor();
}
-
- public AnnotatedConstructor<T> getConstructor(Class<?>... arguments)
- {
- return delegate().getConstructor(arguments);
- }
public Set<AnnotatedConstructor<T>> getConstructors()
{
@@ -81,6 +76,7 @@
return delegate().getMetaAnnotatedFields(metaAnnotationType);
}
+ @Deprecated
public AnnotatedMethod<?> getMethod(Method method)
{
return delegate().getMethod(method);
@@ -111,9 +107,25 @@
return delegate().isAbstract();
}
+ @Deprecated
public AnnotatedMethod<?> getDeclaredMethod(Method method)
{
return delegate().getDeclaredMethod(method);
}
+ public <F> AnnotatedField<F> getDeclaredField(String fieldName, AnnotatedClass<F> expectedType)
+ {
+ return delegate().getDeclaredField(fieldName, expectedType);
+ }
+
+ public <M> AnnotatedMethod<M> getDeclaredMethod(String methodName, AnnotatedClass<M> expectedReturnType, AnnotatedClass<?>... parameterTypes)
+ {
+ return delegate().getDeclaredMethod(methodName, expectedReturnType, parameterTypes);
+ }
+
+ public AnnotatedConstructor<T> getDeclaredConstructor(List<AnnotatedClass<?>> parameterTypes)
+ {
+ return delegate().getDeclaredConstructor(parameterTypes);
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedAnnotationImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedAnnotationImpl.java 2009-03-16 14:50:01 UTC (rev 2043)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedAnnotationImpl.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -26,6 +26,7 @@
import java.util.Set;
import org.jboss.webbeans.introspector.AnnotatedAnnotation;
+import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.AnnotationStore;
import org.jboss.webbeans.util.Strings;
@@ -92,6 +93,8 @@
private final Class<T> clazz;
// The set of abstracted members
private final Set<AnnotatedMethod<?>> members;
+
+ private final Map<String, AnnotatedMethod<?>> namedMembers;
// Cached string representation
private String toString;
@@ -114,6 +117,7 @@
this.clazz = annotationType;
members = new HashSet<AnnotatedMethod<?>>();
annotatedMembers = new AnnotatedMemberMap();
+ this.namedMembers = new HashMap<String, AnnotatedMethod<?>>();
for (Method member : clazz.getDeclaredMethods())
{
AnnotatedMethod<?> annotatedMethod = AnnotatedMethodImpl.of(member, this);
@@ -122,6 +126,7 @@
{
annotatedMembers.put(annotation.annotationType(), annotatedMethod);
}
+ namedMembers.put(annotatedMethod.getName(), annotatedMethod);
}
}
@@ -155,6 +160,11 @@
return Collections.unmodifiableSet(annotatedMembers.get(annotationType));
}
+ public <A> AnnotatedMethod<A> getMember(String memberName, AnnotatedClass<A> expectedType)
+ {
+ return (AnnotatedMethod<A>) namedMembers.get(memberName);
+ }
+
/**
* Gets a string representation of the annotation
*
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java 2009-03-16 14:50:01 UTC (rev 2043)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -52,6 +52,8 @@
public class AnnotatedClassImpl<T> extends AbstractAnnotatedType<T> implements AnnotatedClass<T>
{
+ private static List<Class<?>> NO_ARGUMENTS = Collections.emptyList();
+
/**
* A (annotation type -> set of field abstractions with annotation/meta
* annotation) map
@@ -409,6 +411,11 @@
return Collections.unmodifiableSet(declaredFields);
}
+ public <F> AnnotatedField<F> getDeclaredField(String fieldName, AnnotatedClass<F> expectedType)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public Set<AnnotatedField<?>> getDeclaredAnnotatedFields(Class<? extends Annotation> annotationType)
{
return Collections.unmodifiableSet(declaredAnnotatedFields.get(annotationType));
@@ -426,6 +433,11 @@
return Collections.unmodifiableSet(constructors);
}
+ public AnnotatedConstructor<T> getDeclaredConstructor(List<AnnotatedClass<?>> parameterTypes)
+ {
+ throw new UnsupportedOperationException();
+ }
+
/**
* Gets abstracted fields with requested meta-annotation type present
*
@@ -507,26 +519,11 @@
return Collections.unmodifiableSet(annotatedConstructors.get(annotationType));
}
- /**
- * Gets a constructor with given arguments
- *
- * @param arguments
- * The arguments to match
- * @return A constructor which takes given arguments. Null is returned if
- * there are no matches.
- *
- * @see org.jboss.webbeans.introspector.AnnotatedClass#getConstructor(List)
- */
- public AnnotatedConstructor<T> getConstructor(List<Class<?>> arguments)
+ public AnnotatedConstructor<T> getNoArgsConstructor()
{
- return constructorsByArgumentMap.get(arguments);
+ return constructorsByArgumentMap.get(NO_ARGUMENTS);
}
- public AnnotatedConstructor<T> getConstructor(Class<?>... arguments)
- {
- return getConstructor(Arrays.asList(arguments));
- }
-
public Set<AnnotatedMethod<?>> getMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
{
return Collections.unmodifiableSet(methodsByAnnotatedParameters.get(annotationType));
@@ -563,6 +560,11 @@
return null;
}
+ public <M> AnnotatedMethod<M> getDeclaredMethod(String methodName, AnnotatedClass<M> expectedReturnType, AnnotatedClass<?>... parameterTypes)
+ {
+ throw new UnsupportedOperationException();
+ }
+
/**
* Gets a string representation of the class
*
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ClassReceiver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ClassReceiver.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ClassReceiver.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.util.xml;
+
+import java.lang.reflect.AnnotatedElement;
+
+import org.dom4j.Element;
+
+public interface ClassReceiver
+{
+ boolean accept(Element element);
+
+ AnnotatedElement reciveClass(Element element);
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ClassReceiver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ParseXmlHelper.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ParseXmlHelper.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ParseXmlHelper.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -0,0 +1,209 @@
+package org.jboss.webbeans.util.xml;
+
+import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.inject.DefinitionException;
+
+import org.dom4j.Element;
+
+public class ParseXmlHelper
+{
+ private static List<ClassReceiver> receivers;
+
+ static
+ {
+ receivers = initializeReceivers();
+ }
+
+ public static Set<AnnotatedElement> getBeanClasses(List<Element> beans)
+ {
+ Set<AnnotatedElement> result = new HashSet<AnnotatedElement>();
+
+ for (Element bean : beans)
+ result.add(reciveBeanClass(bean));
+
+ return result;
+ }
+
+ private static AnnotatedElement reciveBeanClass(Element element)
+ {
+ for (ClassReceiver receiver : receivers)
+ {
+ if (receiver.accept(element))
+ {
+ return receiver.reciveClass(element);
+ }
+ }
+
+ throw new DefinitionException("definition of a bean " + element.getName() + " is incorrect");
+ }
+
+ private static List<ClassReceiver> initializeReceivers()
+ {
+ List<ClassReceiver> receivers = new ArrayList<ClassReceiver>();
+
+ ClassReceiver jmsResourceClassReceiver = new ClassReceiver()
+ {
+ public boolean accept(Element element)
+ {
+ return isJMSResource(element);
+ }
+
+ public AnnotatedElement reciveClass(Element element)
+ {
+ return reciveJMSResourceClass(element);
+ }
+
+ };
+ ClassReceiver resourceClassReceiver = new ClassReceiver()
+ {
+ public boolean accept(Element element)
+ {
+ return isResource(element);
+ }
+
+ public AnnotatedElement reciveClass(Element element)
+ {
+ return reciveResourceClass(element);
+ }
+
+ };
+ ClassReceiver sessionBeanClassReceiver = new ClassReceiver()
+ {
+ public boolean accept(Element element)
+ {
+ return isSessionBean(element);
+ }
+
+ public AnnotatedElement reciveClass(Element element)
+ {
+ return reciveSessionBeanClass(element);
+ }
+
+ };
+ ClassReceiver simpleBeanClassReceiver = new ClassReceiver()
+ {
+ public boolean accept(Element element)
+ {
+ return isSimpleBean(element);
+ }
+
+ public AnnotatedElement reciveClass(Element element)
+ {
+ return reciveSimpleBeanClass(element);
+ }
+
+ };
+
+ receivers.add(jmsResourceClassReceiver);
+ receivers.add(resourceClassReceiver);
+ receivers.add(sessionBeanClassReceiver);
+ receivers.add(simpleBeanClassReceiver);
+
+ return receivers;
+ }
+
+ private static boolean isResource(Element element)
+ {
+ Iterator<?> elIterator = element.elementIterator();
+ while (elIterator.hasNext())
+ {
+ Element child = (Element) elIterator.next();
+ if (child.getNamespace().getURI().equalsIgnoreCase(XmlConstants.JAVA_EE_NAMESPACE) &&
+ (child.getName().equalsIgnoreCase(XmlConstants.RESOURCE) ||
+ child.getName().equalsIgnoreCase(XmlConstants.PERSISTENCE_CONTEXT) ||
+ child.getName().equalsIgnoreCase(XmlConstants.PERSISTENCE_UNIT) ||
+ child.getName().equalsIgnoreCase(XmlConstants.EJB) ||
+ child.getName().equalsIgnoreCase(XmlConstants.WEB_SERVICE_REF)))
+ return true;
+ }
+ return false;
+ }
+
+ private static AnnotatedElement reciveResourceClass(Element element)
+ {
+ // TODO:
+ return null;
+ }
+
+ private static boolean isJMSResource(Element element)
+ {
+ if (element.getNamespace().getURI().equalsIgnoreCase(XmlConstants.JAVA_EE_NAMESPACE) &&
+ (element.getName().equalsIgnoreCase(XmlConstants.TOPIC) ||
+ element.getName().equalsIgnoreCase(XmlConstants.QUEUE)))
+ return true;
+ return false;
+ }
+
+ private static AnnotatedElement reciveJMSResourceClass(Element element)
+ {
+ // TODO:
+ return null;
+ }
+
+ private static boolean isSimpleBean(Element element)
+ {
+ Class<?> beanClass = loadClass(element);
+
+ if (!Modifier.isAbstract(beanClass.getModifiers()) &&
+ beanClass.getTypeParameters().length == 0)
+ return true;
+
+ return false;
+ }
+
+ private static AnnotatedElement reciveSimpleBeanClass(Element element)
+ {
+ Class<?> beanClass = loadClass(element);
+
+ if (beanClass.isMemberClass())
+ throw new DefinitionException("class " + beanClass + " is a non-static inner class");
+
+ // if (beanClass.getTypeParameters().length > 0)
+ // throw new DefinitionException("class " + beanClass +
+ // " is a parameterized type");
+
+ // TODO:
+ // boolean isDecorator = false;
+ // if (Modifier.isAbstract(beanClass.getModifiers()) && !isDecorator)
+ // throw new DefinitionException("class " + beanClass +
+ // " is an abstract and not Decorator");
+
+ return beanClass;
+ }
+
+ private static boolean isSessionBean(Element element)
+ {
+ // TODO:
+ return false;
+ }
+
+ private static AnnotatedElement reciveSessionBeanClass(Element element)
+ {
+ // TODO:
+ return null;
+ }
+
+ private static Class<?> loadClass(Element element)
+ {
+ String beanUri = element.getNamespace().getURI();
+ String packageName = beanUri.replaceFirst(XmlConstants.URN_PREFIX, "");
+ String classPath = packageName + "." + element.getName();
+
+ try
+ {
+ return Class.forName(classPath);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new DefinitionException("class " + classPath + " not found");
+ }
+
+ }
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/ParseXmlHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlConstants.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlConstants.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlConstants.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -0,0 +1,34 @@
+package org.jboss.webbeans.util.xml;
+
+public class XmlConstants
+{
+ public static final String JAVA_EE_NAMESPACE = "urn:java:ee";
+
+ public static final String DEPLOY = "Deploy";
+
+ public static final String INTERCEPTORS = "Interceptors";
+
+ public static final String DECORATORS = "Decorators";
+
+ public static final String BINDING_TYPE = "BindingType";
+
+ public static final String INTERCEPTOR_BINDING_TYPE = "InterceptorBindingType";
+
+ public static final String STEREOTYPE = "Stereotype";
+
+ public static final String RESOURCE = "Resource";
+
+ public static final String PERSISTENCE_CONTEXT = "PersistenceContext";
+
+ public static final String PERSISTENCE_UNIT = "PersistenceUnit";
+
+ public static final String EJB = "EJB";
+
+ public static final String WEB_SERVICE_REF = "WebServiceRef";
+
+ public static final String TOPIC = "Topic";
+
+ public static final String QUEUE = "Queue";
+
+ public static final String URN_PREFIX = "urn:java:";
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlParserImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlParserImpl.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlParserImpl.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -0,0 +1,93 @@
+package org.jboss.webbeans.util.xml;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.AnnotatedElement;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+public class XmlParserImpl // implements XmlParser
+{
+
+ private static Logger log = Logger.getLogger(XmlParserImpl.class);
+
+ public Set<AnnotatedElement> parse(Set<URL> xmls)
+ {
+ Set<AnnotatedElement> result = new HashSet<AnnotatedElement>();
+
+ for (URL url : xmls)
+ {
+ try
+ {
+ InputStream xmlStream;
+
+ xmlStream = url.openStream();
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(xmlStream);
+ List<Element> beanElements = findBeans(document);
+ result.addAll(ParseXmlHelper.getBeanClasses(beanElements));
+ }
+ catch (IOException e)
+ {
+ log.debug("Can not open stream for " + url, e);
+ }
+ catch (DocumentException e)
+ {
+ log.debug("Error during the processing of a DOM4J document for " + url, e);
+ }
+ }
+ return result;
+ }
+
+ private List<Element> findBeans(Document document)
+ {
+ List<Element> beans = new ArrayList<Element>();
+
+ Element root = document.getRootElement();
+
+ Iterator<?> elIterator = root.elementIterator();
+ while (elIterator.hasNext())
+ {
+ Element element = (Element) elIterator.next();
+ if (checkElementName(element) && checkElementChildrenNames(element))
+ beans.add(element);
+ }
+
+ return beans;
+ }
+
+ private boolean checkElementName(Element element)
+ {
+ if (element.getNamespace().getURI().equalsIgnoreCase(XmlConstants.JAVA_EE_NAMESPACE) &&
+ (element.getName().equalsIgnoreCase(XmlConstants.DEPLOY) ||
+ element.getName().equalsIgnoreCase(XmlConstants.INTERCEPTORS) ||
+ element.getName().equalsIgnoreCase(XmlConstants.DECORATORS)))
+ return false;
+ return true;
+ }
+
+ private boolean checkElementChildrenNames(Element element)
+ {
+ Iterator<?> elIterator = element.elementIterator();
+ while (elIterator.hasNext())
+ {
+ Element child = (Element) elIterator.next();
+ if (child.getNamespace().getURI().equalsIgnoreCase(XmlConstants.JAVA_EE_NAMESPACE) &&
+ (child.getName().equalsIgnoreCase(XmlConstants.BINDING_TYPE) ||
+ child.getName().equalsIgnoreCase(XmlConstants.INTERCEPTOR_BINDING_TYPE) ||
+ child.getName().equalsIgnoreCase(XmlConstants.STEREOTYPE)))
+ return false;
+ }
+ return true;
+ }
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/xml/XmlParserImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParserEnvironment.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParserEnvironment.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParserEnvironment.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -0,0 +1,63 @@
+package org.jboss.webbeans.xml;
+
+import java.lang.annotation.Annotation;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.webbeans.introspector.AnnotatedAnnotation;
+import org.jboss.webbeans.introspector.AnnotatedClass;
+import org.jboss.webbeans.introspector.jlr.AnnotatedAnnotationImpl;
+import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+
+public class XmlParserEnvironment
+{
+
+ private final List<AnnotatedClass<?>> classes;
+ private final List<AnnotatedAnnotation<?>> annotations;
+ private final Set<URL> webBeansXml;
+ private final List<AnnotatedAnnotation<?>> enabledDeploymentTypes;
+ private final ResourceLoader resourceLoader;
+
+ public XmlParserEnvironment(ResourceLoader resourceLoader, Set<URL> webBeansXml)
+ {
+ this.classes = new ArrayList<AnnotatedClass<?>>();
+ this.annotations = new ArrayList<AnnotatedAnnotation<?>>();
+ this.enabledDeploymentTypes = new ArrayList<AnnotatedAnnotation<?>>();
+ this.webBeansXml = webBeansXml;
+ this.resourceLoader = resourceLoader;
+ }
+
+ public Set<URL> getWebBeansXml()
+ {
+ return webBeansXml;
+ }
+
+ public List<AnnotatedClass<?>> getClasses()
+ {
+ return classes;
+ }
+
+ public List<AnnotatedAnnotation<?>> getAnnotations()
+ {
+ return annotations;
+ }
+
+ public <T> AnnotatedClass<? extends T> loadClass(String className, Class<T> expectedType)
+ {
+ return AnnotatedClassImpl.of(resourceLoader.classForName(className).asSubclass(expectedType));
+ }
+
+ public <T extends Annotation> AnnotatedAnnotation<? extends T> loadAnnotation(String className, Class<T> expectedType)
+ {
+ return AnnotatedAnnotationImpl.of(resourceLoader.classForName(className).asSubclass(expectedType));
+ }
+
+ public List<AnnotatedAnnotation<?>> getEnabledDeploymentTypes()
+ {
+ return enabledDeploymentTypes;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParserEnvironment.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -0,0 +1,55 @@
+package org.jboss.webbeans.test.unit.xml;
+
+import java.lang.reflect.AnnotatedElement;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.jboss.webbeans.test.unit.xml.beans.Order;
+import org.jboss.webbeans.util.xml.XmlParserImpl;
+import org.testng.annotations.Test;
+
+
+public class XmlParserImplTest extends AbstractWebBeansTest
+{
+ @Test
+ public void testParse()
+ {
+ Set<URL> xmls = new HashSet<URL>();
+ Iterable<URL> urls = getResources("user-defined-beans.xml");
+
+ for (URL url : urls)
+ xmls.add(url);
+
+ XmlParserImpl parser = new XmlParserImpl();
+ Set<AnnotatedElement> aSet = parser.parse(xmls);
+
+ for(AnnotatedElement aElement : aSet){
+ assert aElement.equals(Order.class);
+ }
+ assert aSet.size() == 1;
+ }
+}
+
+/*
+<Beans xmlns="urn:java:ee" xmlns:myapp="urn:java:com.mydomain.myapp"
+xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
+<Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+</Deploy>
+<myapp:Order>
+ <ConversationScoped />
+ <myapp:PaymentProcessor>
+ <myapp:Asynchronous />
+ </myapp:PaymentProcessor>
+ <myapp:User />
+</myapp:Order>
+<myapp:Login>
+ <ConversationScoped />
+ <BindingType />
+</myapp:Login>
+</Beans>
+*/
Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/beans/Order.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/beans/Order.java (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/beans/Order.java 2009-03-16 14:56:06 UTC (rev 2044)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.xml.beans;
+
+public class Order
+{
+
+}
Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/beans/Order.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml
===================================================================
--- ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml 2009-03-16 14:50:01 UTC (rev 2043)
+++ ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml 2009-03-16 14:56:06 UTC (rev 2044)
@@ -1,8 +1,19 @@
-<Beans xmlns="urn:java:ee"
- xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
- <Deploy>
- <Standard />
- <Production />
- <test:AnotherDeploymentType />
- </Deploy>
-</Beans>
+<Beans xmlns="urn:java:ee" xmlns:myapp="urn:java:org.jboss.webbeans.test.unit.xml.beans"
+ xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+ <myapp:Order>
+ <ConversationScoped />
+ <myapp:PaymentProcessor>
+ <myapp:Asynchronous />
+ </myapp:PaymentProcessor>
+ <myapp:User />
+ </myapp:Order>
+ <myapp:Login>
+ <ConversationScoped />
+ <BindingType />
+ </myapp:Login>
+</Beans>
\ No newline at end of file
15 years, 10 months
[webbeans-commits] Webbeans SVN: r2043 - in ri/tags/1.0.0.BETA1/impl: src/main/java/org/jboss/webbeans/util and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-16 10:50:01 -0400 (Mon, 16 Mar 2009)
New Revision: 2043
Removed:
ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/
ri/tags/1.0.0.BETA1/impl/src/test/java/com/mydomain/myapp/
ri/tags/1.0.0.BETA1/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java
Modified:
ri/tags/1.0.0.BETA1/impl/pom.xml
ri/tags/1.0.0.BETA1/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml
Log:
Revert r2042
Modified: ri/tags/1.0.0.BETA1/impl/pom.xml
===================================================================
--- ri/tags/1.0.0.BETA1/impl/pom.xml 2009-03-16 14:18:43 UTC (rev 2042)
+++ ri/tags/1.0.0.BETA1/impl/pom.xml 2009-03-16 14:50:01 UTC (rev 2043)
@@ -82,12 +82,6 @@
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
-
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- </dependency>
<dependency>
<groupId>log4j</groupId>
Deleted: ri/tags/1.0.0.BETA1/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java
===================================================================
--- ri/tags/1.0.0.BETA1/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java 2009-03-16 14:18:43 UTC (rev 2042)
+++ ri/tags/1.0.0.BETA1/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java 2009-03-16 14:50:01 UTC (rev 2043)
@@ -1,56 +0,0 @@
-package org.jboss.webbeans.test.unit.xml;
-
-import java.lang.reflect.AnnotatedElement;
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.webbeans.test.unit.AbstractTest;
-import org.jboss.webbeans.util.xml.XmlParserImpl;
-//import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.testng.annotations.Test;
-
-import com.mydomain.myapp.Order;
-
-public class XmlParserImplTest extends AbstractTest
-{
- @Test
- public void testParse()
- {
- Set<URL> xmls = new HashSet<URL>();
- Iterable<URL> urls = getResources("user-defined-beans.xml");
-
- for (URL url : urls)
- xmls.add(url);
-
- XmlParserImpl parser = new XmlParserImpl();
- Set<AnnotatedElement> aSet = parser.parse(xmls);
-
- assert aSet.size() == 1;
- for(AnnotatedElement aElement : aSet){
- assert aElement.equals(Order.class);
- }
- }
-}
-
-/*
-<Beans xmlns="urn:java:ee" xmlns:myapp="urn:java:com.mydomain.myapp"
-xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
-<Deploy>
- <Standard />
- <Production />
- <test:AnotherDeploymentType />
-</Deploy>
-<myapp:Order>
- <ConversationScoped />
- <myapp:PaymentProcessor>
- <myapp:Asynchronous />
- </myapp:PaymentProcessor>
- <myapp:User />
-</myapp:Order>
-<myapp:Login>
- <ConversationScoped />
- <BindingType />
-</myapp:Login>
-</Beans>
-*/
Modified: ri/tags/1.0.0.BETA1/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml
===================================================================
--- ri/tags/1.0.0.BETA1/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml 2009-03-16 14:18:43 UTC (rev 2042)
+++ ri/tags/1.0.0.BETA1/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml 2009-03-16 14:50:01 UTC (rev 2043)
@@ -1,19 +1,8 @@
-<Beans xmlns="urn:java:ee" xmlns:myapp="urn:java:com.mydomain.myapp"
- xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
- <Deploy>
- <Standard />
- <Production />
- <test:AnotherDeploymentType />
- </Deploy>
- <myapp:Order>
- <ConversationScoped />
- <myapp:PaymentProcessor>
- <myapp:Asynchronous />
- </myapp:PaymentProcessor>
- <myapp:User />
- </myapp:Order>
- <myapp:Login>
- <ConversationScoped />
- <BindingType />
- </myapp:Login>
-</Beans>
\ No newline at end of file
+<Beans xmlns="urn:java:ee"
+ xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
15 years, 10 months
[webbeans-commits] Webbeans SVN: r2042 - in ri/tags/1.0.0.BETA1/impl: src/main/java/org/jboss/webbeans/util and 7 other directories.
by webbeans-commits@lists.jboss.org
Author: vitold
Date: 2009-03-16 10:18:43 -0400 (Mon, 16 Mar 2009)
New Revision: 2042
Added:
ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/
ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/ClassReceiver.java
ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/ParseXmlHelper.java
ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/XmlConstants.java
ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/XmlParserImpl.java
ri/tags/1.0.0.BETA1/impl/src/test/java/com/
ri/tags/1.0.0.BETA1/impl/src/test/java/com/mydomain/
ri/tags/1.0.0.BETA1/impl/src/test/java/com/mydomain/myapp/
ri/tags/1.0.0.BETA1/impl/src/test/java/com/mydomain/myapp/Order.java
ri/tags/1.0.0.BETA1/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java
Modified:
ri/tags/1.0.0.BETA1/impl/pom.xml
ri/tags/1.0.0.BETA1/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml
Log:
add helper class for parsing beans.xml, test class for it, modify user-defined-beans.xml
Modified: ri/tags/1.0.0.BETA1/impl/pom.xml
===================================================================
--- ri/tags/1.0.0.BETA1/impl/pom.xml 2009-03-16 13:27:36 UTC (rev 2041)
+++ ri/tags/1.0.0.BETA1/impl/pom.xml 2009-03-16 14:18:43 UTC (rev 2042)
@@ -82,6 +82,12 @@
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ </dependency>
<dependency>
<groupId>log4j</groupId>
Added: ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/ClassReceiver.java
===================================================================
--- ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/ClassReceiver.java (rev 0)
+++ ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/ClassReceiver.java 2009-03-16 14:18:43 UTC (rev 2042)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.util.xml;
+
+import java.lang.reflect.AnnotatedElement;
+
+import org.dom4j.Element;
+
+public interface ClassReceiver
+{
+ boolean accept(Element element);
+
+ AnnotatedElement reciveClass(Element element);
+}
Added: ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/ParseXmlHelper.java
===================================================================
--- ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/ParseXmlHelper.java (rev 0)
+++ ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/ParseXmlHelper.java 2009-03-16 14:18:43 UTC (rev 2042)
@@ -0,0 +1,215 @@
+package org.jboss.webbeans.util.xml;
+
+import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.inject.DefinitionException;
+
+import org.dom4j.Element;
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.ManagerImpl;
+
+import com.sun.org.apache.xml.internal.serialize.XHTMLSerializer;
+
+public class ParseXmlHelper
+{
+ private static List<ClassReceiver> receivers;
+
+ static
+ {
+ receivers = initializeReceivers();
+ }
+
+ public static Set<AnnotatedElement> getBeanClasses(List<Element> beans)
+ {
+ Set<AnnotatedElement> result = new HashSet<AnnotatedElement>();
+
+ for (Element bean : beans)
+ result.add(reciveBeanClass(bean));
+
+ return result;
+ }
+
+ private static AnnotatedElement reciveBeanClass(Element element)
+ {
+ for (ClassReceiver receiver : receivers)
+ {
+ if (receiver.accept(element))
+ {
+ return receiver.reciveClass(element);
+ }
+ }
+
+ throw new DefinitionException("definition of a bean " + element.getName() + " is incorrect");
+ }
+
+ private static List<ClassReceiver> initializeReceivers()
+ {
+ List<ClassReceiver> receivers = new ArrayList<ClassReceiver>();
+
+ ClassReceiver jmsResourceClassReceiver = new ClassReceiver()
+ {
+ public boolean accept(Element element)
+ {
+ return isJMSResource(element);
+ }
+
+ public AnnotatedElement reciveClass(Element element)
+ {
+ return reciveJMSResourceClass(element);
+ }
+
+ };
+ ClassReceiver resourceClassReceiver = new ClassReceiver()
+ {
+ public boolean accept(Element element)
+ {
+ return isResource(element);
+ }
+
+ public AnnotatedElement reciveClass(Element element)
+ {
+ return reciveResourceClass(element);
+ }
+
+ };
+ ClassReceiver sessionBeanClassReceiver = new ClassReceiver()
+ {
+ public boolean accept(Element element)
+ {
+ return isSessionBean(element);
+ }
+
+ public AnnotatedElement reciveClass(Element element)
+ {
+ return reciveSessionBeanClass(element);
+ }
+
+ };
+ ClassReceiver simpleBeanClassReceiver = new ClassReceiver()
+ {
+ public boolean accept(Element element)
+ {
+ return isSimpleBean(element);
+ }
+
+ public AnnotatedElement reciveClass(Element element)
+ {
+ return reciveSimpleBeanClass(element);
+ }
+
+ };
+
+ receivers.add(jmsResourceClassReceiver);
+ receivers.add(resourceClassReceiver);
+ receivers.add(sessionBeanClassReceiver);
+ receivers.add(simpleBeanClassReceiver);
+
+ return receivers;
+ }
+
+ private static boolean isResource(Element element)
+ {
+ Iterator<?> elIterator = element.elementIterator();
+ while (elIterator.hasNext())
+ {
+ Element child = (Element) elIterator.next();
+ if (child.getNamespace().getURI().equalsIgnoreCase(XmlConstants.JAVA_EE_NAMESPACE) &&
+ (child.getName().equalsIgnoreCase(XmlConstants.RESOURCE) ||
+ child.getName().equalsIgnoreCase(XmlConstants.PERSISTENCE_CONTEXT) ||
+ child.getName().equalsIgnoreCase(XmlConstants.PERSISTENCE_UNIT) ||
+ child.getName().equalsIgnoreCase(XmlConstants.EJB) ||
+ child.getName().equalsIgnoreCase(XmlConstants.WEB_SERVICE_REF)))
+ return true;
+ }
+ return false;
+ }
+
+ private static AnnotatedElement reciveResourceClass(Element element)
+ {
+ // TODO:
+ return null;
+ }
+
+ private static boolean isJMSResource(Element element)
+ {
+ if (element.getNamespace().getURI().equalsIgnoreCase(XmlConstants.JAVA_EE_NAMESPACE) &&
+ (element.getName().equalsIgnoreCase(XmlConstants.TOPIC) ||
+ element.getName().equalsIgnoreCase(XmlConstants.QUEUE)))
+ return true;
+ return false;
+ }
+
+ private static AnnotatedElement reciveJMSResourceClass(Element element)
+ {
+ // TODO:
+ return null;
+ }
+
+ private static boolean isSimpleBean(Element element)
+ {
+ Class<?> beanClass = loadClass(element);
+ ManagerImpl manager = CurrentManager.rootManager();
+ if (!Modifier.isAbstract(beanClass.getModifiers()) &&
+ !manager.getEjbDescriptorCache().containsKey(element.getName()) &&
+ beanClass.getTypeParameters().length == 0)
+ return true;
+
+ return false;
+ }
+
+ private static AnnotatedElement reciveSimpleBeanClass(Element element)
+ {
+ Class<?> beanClass = loadClass(element);
+
+ if (beanClass.isMemberClass())
+ throw new DefinitionException("class " + beanClass + " is a non-static inner class");
+
+// if (beanClass.getTypeParameters().length > 0)
+// throw new DefinitionException("class " + beanClass + " is a parameterized type");
+
+ // TODO:
+// boolean isDecorator = false;
+// if (Modifier.isAbstract(beanClass.getModifiers()) && !isDecorator)
+// throw new DefinitionException("class " + beanClass + " is an abstract and not Decorator");
+
+ return beanClass;
+ }
+
+ private static boolean isSessionBean(Element element)
+ {
+ ManagerImpl manager = CurrentManager.rootManager();
+ if (manager.getEjbDescriptorCache().containsKey(element.getName()) ||
+ element.attribute(XmlConstants.EJB_NAME) != null)
+ return true;
+ return false;
+ }
+
+ private static AnnotatedElement reciveSessionBeanClass(Element element)
+ {
+ // TODO:
+ return null;
+ }
+
+ private static Class<?> loadClass(Element element)
+ {
+ String beanUri = element.getNamespace().getURI();
+ String packageName = beanUri.replaceFirst(XmlConstants.URN_PREFIX, "");
+ String classPath = packageName + "." + element.getName();
+
+ try
+ {
+ return Class.forName(classPath);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new DefinitionException("class " + classPath + " not found");
+ }
+
+ }
+}
Added: ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/XmlConstants.java
===================================================================
--- ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/XmlConstants.java (rev 0)
+++ ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/XmlConstants.java 2009-03-16 14:18:43 UTC (rev 2042)
@@ -0,0 +1,36 @@
+package org.jboss.webbeans.util.xml;
+
+public class XmlConstants
+{
+ public static final String JAVA_EE_NAMESPACE = "urn:java:ee";
+
+ public static final String DEPLOY = "Deploy";
+
+ public static final String INTERCEPTORS = "Interceptors";
+
+ public static final String DECORATORS = "Decorators";
+
+ public static final String BINDING_TYPE = "BindingType";
+
+ public static final String INTERCEPTOR_BINDING_TYPE = "InterceptorBindingType";
+
+ public static final String STEREOTYPE = "Stereotype";
+
+ public static final String RESOURCE = "Resource";
+
+ public static final String PERSISTENCE_CONTEXT = "PersistenceContext";
+
+ public static final String PERSISTENCE_UNIT = "PersistenceUnit";
+
+ public static final String EJB = "EJB";
+
+ public static final String WEB_SERVICE_REF = "WebServiceRef";
+
+ public static final String TOPIC = "Topic";
+
+ public static final String QUEUE = "Queue";
+
+ public static final String URN_PREFIX = "urn:java:";
+
+ public static final String EJB_NAME = "ejbName";
+}
Added: ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/XmlParserImpl.java
===================================================================
--- ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/XmlParserImpl.java (rev 0)
+++ ri/tags/1.0.0.BETA1/impl/src/main/java/org/jboss/webbeans/util/xml/XmlParserImpl.java 2009-03-16 14:18:43 UTC (rev 2042)
@@ -0,0 +1,93 @@
+package org.jboss.webbeans.util.xml;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.AnnotatedElement;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+public class XmlParserImpl // implements XmlParser
+{
+
+ private static Logger log = Logger.getLogger(XmlParserImpl.class);
+
+ public Set<AnnotatedElement> parse(Set<URL> xmls)
+ {
+ Set<AnnotatedElement> result = new HashSet<AnnotatedElement>();
+
+ for (URL url : xmls)
+ {
+ try
+ {
+ InputStream xmlStream;
+
+ xmlStream = url.openStream();
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(xmlStream);
+ List<Element> beanElements = findBeans(document);
+ result.addAll(ParseXmlHelper.getBeanClasses(beanElements));
+ }
+ catch (IOException e)
+ {
+ log.debug("Can not open stream for " + url, e);
+ }
+ catch (DocumentException e)
+ {
+ log.debug("Error during the processing of a DOM4J document for " + url, e);
+ }
+ }
+ return result;
+ }
+
+ private List<Element> findBeans(Document document)
+ {
+ List<Element> beans = new ArrayList<Element>();
+
+ Element root = document.getRootElement();
+
+ Iterator<?> elIterator = root.elementIterator();
+ while (elIterator.hasNext())
+ {
+ Element element = (Element) elIterator.next();
+ if (checkElementName(element) && checkElementChildrenNames(element))
+ beans.add(element);
+ }
+
+ return beans;
+ }
+
+ private boolean checkElementName(Element element)
+ {
+ if (element.getNamespace().getURI().equalsIgnoreCase(XmlConstants.JAVA_EE_NAMESPACE) &&
+ (element.getName().equalsIgnoreCase(XmlConstants.DEPLOY) ||
+ element.getName().equalsIgnoreCase(XmlConstants.INTERCEPTORS) ||
+ element.getName().equalsIgnoreCase(XmlConstants.DECORATORS)))
+ return false;
+ return true;
+ }
+
+ private boolean checkElementChildrenNames(Element element)
+ {
+ Iterator<?> elIterator = element.elementIterator();
+ while (elIterator.hasNext())
+ {
+ Element child = (Element) elIterator.next();
+ if (child.getNamespace().getURI().equalsIgnoreCase(XmlConstants.JAVA_EE_NAMESPACE) &&
+ (child.getName().equalsIgnoreCase(XmlConstants.BINDING_TYPE) ||
+ child.getName().equalsIgnoreCase(XmlConstants.INTERCEPTOR_BINDING_TYPE) ||
+ child.getName().equalsIgnoreCase(XmlConstants.STEREOTYPE)))
+ return false;
+ }
+ return true;
+ }
+}
Added: ri/tags/1.0.0.BETA1/impl/src/test/java/com/mydomain/myapp/Order.java
===================================================================
--- ri/tags/1.0.0.BETA1/impl/src/test/java/com/mydomain/myapp/Order.java (rev 0)
+++ ri/tags/1.0.0.BETA1/impl/src/test/java/com/mydomain/myapp/Order.java 2009-03-16 14:18:43 UTC (rev 2042)
@@ -0,0 +1,6 @@
+package com.mydomain.myapp;
+
+public class Order
+{
+
+}
Added: ri/tags/1.0.0.BETA1/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java
===================================================================
--- ri/tags/1.0.0.BETA1/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java (rev 0)
+++ ri/tags/1.0.0.BETA1/impl/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java 2009-03-16 14:18:43 UTC (rev 2042)
@@ -0,0 +1,56 @@
+package org.jboss.webbeans.test.unit.xml;
+
+import java.lang.reflect.AnnotatedElement;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.webbeans.util.xml.XmlParserImpl;
+//import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.testng.annotations.Test;
+
+import com.mydomain.myapp.Order;
+
+public class XmlParserImplTest extends AbstractTest
+{
+ @Test
+ public void testParse()
+ {
+ Set<URL> xmls = new HashSet<URL>();
+ Iterable<URL> urls = getResources("user-defined-beans.xml");
+
+ for (URL url : urls)
+ xmls.add(url);
+
+ XmlParserImpl parser = new XmlParserImpl();
+ Set<AnnotatedElement> aSet = parser.parse(xmls);
+
+ assert aSet.size() == 1;
+ for(AnnotatedElement aElement : aSet){
+ assert aElement.equals(Order.class);
+ }
+ }
+}
+
+/*
+<Beans xmlns="urn:java:ee" xmlns:myapp="urn:java:com.mydomain.myapp"
+xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
+<Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+</Deploy>
+<myapp:Order>
+ <ConversationScoped />
+ <myapp:PaymentProcessor>
+ <myapp:Asynchronous />
+ </myapp:PaymentProcessor>
+ <myapp:User />
+</myapp:Order>
+<myapp:Login>
+ <ConversationScoped />
+ <BindingType />
+</myapp:Login>
+</Beans>
+*/
Modified: ri/tags/1.0.0.BETA1/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml
===================================================================
--- ri/tags/1.0.0.BETA1/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml 2009-03-16 13:27:36 UTC (rev 2041)
+++ ri/tags/1.0.0.BETA1/impl/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml 2009-03-16 14:18:43 UTC (rev 2042)
@@ -1,8 +1,19 @@
-<Beans xmlns="urn:java:ee"
- xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
- <Deploy>
- <Standard />
- <Production />
- <test:AnotherDeploymentType />
- </Deploy>
-</Beans>
+<Beans xmlns="urn:java:ee" xmlns:myapp="urn:java:com.mydomain.myapp"
+ xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+ <myapp:Order>
+ <ConversationScoped />
+ <myapp:PaymentProcessor>
+ <myapp:Asynchronous />
+ </myapp:PaymentProcessor>
+ <myapp:User />
+ </myapp:Order>
+ <myapp:Login>
+ <ConversationScoped />
+ <BindingType />
+ </myapp:Login>
+</Beans>
\ No newline at end of file
15 years, 10 months
[webbeans-commits] Webbeans SVN: r2041 - in ri/tags/webbeans-core-1.0.0.BETA1: src/main/java/org/jboss/webbeans/util and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: vitold
Date: 2009-03-16 09:27:36 -0400 (Mon, 16 Mar 2009)
New Revision: 2041
Removed:
ri/tags/webbeans-core-1.0.0.BETA1/src/main/java/org/jboss/webbeans/util/xml/
ri/tags/webbeans-core-1.0.0.BETA1/src/test/java/com/
ri/tags/webbeans-core-1.0.0.BETA1/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java
Modified:
ri/tags/webbeans-core-1.0.0.BETA1/pom.xml
ri/tags/webbeans-core-1.0.0.BETA1/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml
Log:
rollback
Modified: ri/tags/webbeans-core-1.0.0.BETA1/pom.xml
===================================================================
--- ri/tags/webbeans-core-1.0.0.BETA1/pom.xml 2009-03-16 13:18:30 UTC (rev 2040)
+++ ri/tags/webbeans-core-1.0.0.BETA1/pom.xml 2009-03-16 13:27:36 UTC (rev 2041)
@@ -10,7 +10,7 @@
<version>1.0.0.BETA1</version>
<name>Web Beans Core</name>
<dependencies>
-
+
<dependency>
<groupId>org.jboss.webbeans</groupId>
<artifactId>jsr299-api</artifactId>
@@ -82,14 +82,8 @@
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
-
+
<dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- </dependency>
-
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
Deleted: ri/tags/webbeans-core-1.0.0.BETA1/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java
===================================================================
--- ri/tags/webbeans-core-1.0.0.BETA1/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java 2009-03-16 13:18:30 UTC (rev 2040)
+++ ri/tags/webbeans-core-1.0.0.BETA1/src/test/java/org/jboss/webbeans/test/unit/xml/XmlParserImplTest.java 2009-03-16 13:27:36 UTC (rev 2041)
@@ -1,56 +0,0 @@
-package org.jboss.webbeans.test.unit.xml;
-
-import java.lang.reflect.AnnotatedElement;
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.webbeans.test.unit.AbstractTest;
-import org.jboss.webbeans.util.xml.XmlParserImpl;
-//import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.testng.annotations.Test;
-
-import com.mydomain.myapp.Order;
-
-public class XmlParserImplTest extends AbstractTest
-{
- @Test
- public void testParse()
- {
- Set<URL> xmls = new HashSet<URL>();
- Iterable<URL> urls = getResources("user-defined-beans.xml");
-
- for (URL url : urls)
- xmls.add(url);
-
- XmlParserImpl parser = new XmlParserImpl();
- Set<AnnotatedElement> aSet = parser.parse(xmls);
-
- for(AnnotatedElement aElement : aSet){
- assert aElement.equals(Order.class);
- }
- assert aSet.size() == 1;
- }
-}
-
-/*
-<Beans xmlns="urn:java:ee" xmlns:myapp="urn:java:com.mydomain.myapp"
-xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
-<Deploy>
- <Standard />
- <Production />
- <test:AnotherDeploymentType />
-</Deploy>
-<myapp:Order>
- <ConversationScoped />
- <myapp:PaymentProcessor>
- <myapp:Asynchronous />
- </myapp:PaymentProcessor>
- <myapp:User />
-</myapp:Order>
-<myapp:Login>
- <ConversationScoped />
- <BindingType />
-</myapp:Login>
-</Beans>
-*/
Modified: ri/tags/webbeans-core-1.0.0.BETA1/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml
===================================================================
--- ri/tags/webbeans-core-1.0.0.BETA1/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml 2009-03-16 13:18:30 UTC (rev 2040)
+++ ri/tags/webbeans-core-1.0.0.BETA1/src/test/resources/org/jboss/webbeans/test/unit/xml/user-defined-beans.xml 2009-03-16 13:27:36 UTC (rev 2041)
@@ -1,19 +1,8 @@
-<Beans xmlns="urn:java:ee" xmlns:myapp="urn:java:com.mydomain.myapp"
- xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
- <Deploy>
- <Standard />
- <Production />
- <test:AnotherDeploymentType />
- </Deploy>
- <myapp:Order>
- <ConversationScoped />
- <myapp:PaymentProcessor>
- <myapp:Asynchronous />
- </myapp:PaymentProcessor>
- <myapp:User />
- </myapp:Order>
- <myapp:Login>
- <ConversationScoped />
- <BindingType />
- </myapp:Login>
-</Beans>
\ No newline at end of file
+<Beans xmlns="urn:java:ee"
+ xmlns:test="urn:java:org.jboss.webbeans.test.unit.xml">
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
15 years, 10 months
[webbeans-commits] Webbeans SVN: r2040 - in examples/trunk: conversations and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-16 09:18:30 -0400 (Mon, 16 Mar 2009)
New Revision: 2040
Modified:
examples/trunk/conversations/pom.xml
examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
examples/trunk/pom.xml
Log:
fix deps
Modified: examples/trunk/conversations/pom.xml
===================================================================
--- examples/trunk/conversations/pom.xml 2009-03-16 13:16:45 UTC (rev 2039)
+++ examples/trunk/conversations/pom.xml 2009-03-16 13:18:30 UTC (rev 2040)
@@ -39,11 +39,17 @@
<dependency>
<groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-core</artifactId>
+ <artifactId>webbeans-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<scope>provided</scope>
Modified: examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
===================================================================
--- examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java 2009-03-16 13:16:45 UTC (rev 2039)
+++ examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java 2009-03-16 13:18:30 UTC (rev 2040)
@@ -12,8 +12,8 @@
import javax.inject.Produces;
import org.jboss.webbeans.conversation.ConversationIdGenerator;
+import org.jboss.webbeans.conversation.ConversationInactivityTimeout;
import org.jboss.webbeans.conversation.ConversationManager;
-import org.jboss.webbeans.conversation.bindings.ConversationInactivityTimeout;
@SessionScoped
Modified: examples/trunk/pom.xml
===================================================================
--- examples/trunk/pom.xml 2009-03-16 13:16:45 UTC (rev 2039)
+++ examples/trunk/pom.xml 2009-03-16 13:18:30 UTC (rev 2040)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-version-matrix</artifactId>
- <version>1.0.0.BETA1</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.webbeans.examples</groupId>
<artifactId>parent</artifactId>
15 years, 10 months
[webbeans-commits] Webbeans SVN: r2039 - ri/trunk/version-matrix.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-16 09:16:45 -0400 (Mon, 16 Mar 2009)
New Revision: 2039
Modified:
ri/trunk/version-matrix/
Log:
ignores
Property changes on: ri/trunk/version-matrix
___________________________________________________________________
Name: svn:ignore
+ target
15 years, 10 months
[webbeans-commits] Webbeans SVN: r2038 - in ri/trunk: core-api and 13 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-16 09:14:48 -0400 (Mon, 16 Mar 2009)
New Revision: 2038
Added:
ri/trunk/core-api/
ri/trunk/core-api/pom.xml
ri/trunk/core-api/src/
ri/trunk/core-api/src/main/
ri/trunk/core-api/src/main/java/
ri/trunk/core-api/src/main/java/org/
ri/trunk/core-api/src/main/java/org/jboss/
ri/trunk/core-api/src/main/java/org/jboss/webbeans/
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationConcurrentAccessTimeout.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdName.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationInactivityTimeout.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java
ri/trunk/core-api/src/main/resources/
ri/trunk/core-api/src/test/
ri/trunk/core-api/src/test/java/
ri/trunk/core-api/src/test/resources/
Removed:
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/bindings/
Modified:
ri/trunk/impl/pom.xml
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/PhaseHelper.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationPropagationFilter.java
ri/trunk/pom.xml
ri/trunk/version-matrix/pom.xml
Log:
split out core-api
Added: ri/trunk/core-api/pom.xml
===================================================================
--- ri/trunk/core-api/pom.xml (rev 0)
+++ ri/trunk/core-api/pom.xml 2009-03-16 13:14:48 UTC (rev 2038)
@@ -0,0 +1,25 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>webbeans-parent</artifactId>
+ <groupId>org.jboss.webbeans</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-api</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <name>Web Beans Core API</name>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>jsr299-api</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+</project>
Added: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationConcurrentAccessTimeout.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationConcurrentAccessTimeout.java (rev 0)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationConcurrentAccessTimeout.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -0,0 +1,42 @@
+/*
+ * 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.webbeans.conversation;
+
+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.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+/**
+ * The conversation context concurrent access wait timeout on a lock
+ *
+ * @author Nicklas Karlsson
+ */
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface ConversationConcurrentAccessTimeout
+{
+}
Added: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java (rev 0)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -0,0 +1,32 @@
+/*
+ * 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.webbeans.conversation;
+
+/**
+ * Generates conversation ID:s for the conversation manager
+ *
+ * @author Nicklas Karlsson
+ * @see org.jboss.webbeans.conversation.ConversationManager#beginOrRestoreConversation(String)
+ */
+public interface ConversationIdGenerator
+{
+ /**
+ * Gets the next ID for a new conversation
+ * @return The ID
+ */
+ public abstract String nextId();
+}
Added: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdName.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdName.java (rev 0)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdName.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -0,0 +1,42 @@
+/*
+ * 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.webbeans.conversation;
+
+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.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+/**
+ * The conversation id request parameter name
+ *
+ * @author Nicklas Karlsson
+ */
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface ConversationIdName
+{
+}
Added: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationInactivityTimeout.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationInactivityTimeout.java (rev 0)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationInactivityTimeout.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -0,0 +1,42 @@
+/*
+ * 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.webbeans.conversation;
+
+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.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+/**
+ * The conversation context inactivity timeout
+ *
+ * @author Nicklas Karlsson
+ */
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface ConversationInactivityTimeout
+{
+}
Added: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java (rev 0)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -0,0 +1,56 @@
+/*
+ * 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.webbeans.conversation;
+
+import java.util.Set;
+
+import javax.context.Conversation;
+
+/**
+ * A conversation manager responsible for starting, resuming and ending conversations
+ *
+ * @author Nicklas Karlsson
+ * @see org.jboss.webbeans.conversation.ConversationManager
+ */
+public interface ConversationManager
+{
+ /**
+ * Begins or restores a conversation
+ *
+ * @param cid The incoming conversation ID. Can be null in cases of transient conversations
+ */
+ public abstract void beginOrRestoreConversation(String cid);
+
+ /**
+ * Cleans up the current conversation, destroying transient conversation and handling
+ * long-running conversations
+ */
+ public abstract void cleanupConversation();
+
+ /**
+ * Destroys all long-running conversations
+ */
+ public abstract void destroyAllConversations();
+
+ /**
+ * Gets the currently managed long-running conversations
+ *
+ * @return the conversations
+ */
+ public abstract Set<Conversation> getLongRunningConversations();
+
+}
Added: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java (rev 0)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -0,0 +1,38 @@
+/*
+ * 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.webbeans.conversation;
+
+import java.util.concurrent.Future;
+
+/**
+ * A conversation terminator for scheduling inactivity timeout destructions
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+public interface ConversationTerminator
+{
+ /**
+ * Schedules a termination
+ *
+ * @param terminationTask The termination task to run
+ * @param timeoutInMilliseconds The timeout in milliseconds
+ *
+ * @return A handle for manipulating the task later on
+ */
+ public abstract Future<?> scheduleForTermination(Runnable terminationTask, long timeoutInMilliseconds);
+}
Modified: ri/trunk/impl/pom.xml
===================================================================
--- ri/trunk/impl/pom.xml 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/impl/pom.xml 2009-03-16 13:14:48 UTC (rev 2038)
@@ -18,6 +18,11 @@
<dependency>
<groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-spi</artifactId>
</dependency>
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -1,32 +0,0 @@
-/*
- * 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.webbeans.conversation;
-
-/**
- * Generates conversation ID:s for the conversation manager
- *
- * @author Nicklas Karlsson
- * @see org.jboss.webbeans.conversation.ConversationManager#beginOrRestoreConversation(String)
- */
-public interface ConversationIdGenerator
-{
- /**
- * Gets the next ID for a new conversation
- * @return The ID
- */
- public abstract String nextId();
-}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -23,7 +23,6 @@
import javax.inject.Initializer;
import javax.inject.Standard;
-import org.jboss.webbeans.conversation.bindings.ConversationInactivityTimeout;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -1,56 +0,0 @@
-/*
- * 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.webbeans.conversation;
-
-import java.util.Set;
-
-import javax.context.Conversation;
-
-/**
- * A conversation manager responsible for starting, resuming and ending conversations
- *
- * @author Nicklas Karlsson
- * @see org.jboss.webbeans.conversation.ConversationManager
- */
-public interface ConversationManager
-{
- /**
- * Begins or restores a conversation
- *
- * @param cid The incoming conversation ID. Can be null in cases of transient conversations
- */
- public abstract void beginOrRestoreConversation(String cid);
-
- /**
- * Cleans up the current conversation, destroying transient conversation and handling
- * long-running conversations
- */
- public abstract void cleanupConversation();
-
- /**
- * Destroys all long-running conversations
- */
- public abstract void destroyAllConversations();
-
- /**
- * Gets the currently managed long-running conversations
- *
- * @return the conversations
- */
- public abstract Set<Conversation> getLongRunningConversations();
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -1,38 +0,0 @@
-/*
- * 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.webbeans.conversation;
-
-import java.util.concurrent.Future;
-
-/**
- * A conversation terminator for scheduling inactivity timeout destructions
- *
- * @author Nicklas Karlsson
- *
- */
-public interface ConversationTerminator
-{
- /**
- * Schedules a termination
- *
- * @param terminationTask The termination task to run
- * @param timeoutInMilliseconds The timeout in milliseconds
- *
- * @return A handle for manipulating the task later on
- */
- public abstract Future<?> scheduleForTermination(Runnable terminationTask, long timeoutInMilliseconds);
-}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -33,9 +33,6 @@
import org.jboss.webbeans.CurrentManager;
import org.jboss.webbeans.WebBean;
import org.jboss.webbeans.context.ConversationContext;
-import org.jboss.webbeans.conversation.bindings.ConversationConcurrentAccessTimeout;
-import org.jboss.webbeans.conversation.bindings.ConversationIdName;
-import org.jboss.webbeans.conversation.bindings.ConversationInactivityTimeout;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.servlet.HttpSessionManager;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/PhaseHelper.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/PhaseHelper.java 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/PhaseHelper.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -21,7 +21,7 @@
import javax.servlet.http.HttpSession;
import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.conversation.bindings.ConversationIdName;
+import org.jboss.webbeans.conversation.ConversationIdName;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationPropagationFilter.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationPropagationFilter.java 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationPropagationFilter.java 2009-03-16 13:14:48 UTC (rev 2038)
@@ -31,7 +31,7 @@
import javax.servlet.http.HttpServletResponseWrapper;
import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.conversation.bindings.ConversationIdName;
+import org.jboss.webbeans.conversation.ConversationIdName;
/**
* Filter for handling conversation propagation over redirects
Modified: ri/trunk/pom.xml
===================================================================
--- ri/trunk/pom.xml 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/pom.xml 2009-03-16 13:14:48 UTC (rev 2038)
@@ -54,6 +54,7 @@
<module>parent</module>
<module>api</module>
<module>spi</module>
+ <module>core-api</module>
</modules>
</profile>
<profile>
@@ -66,6 +67,7 @@
<module>parent</module>
<module>api</module>
<module>spi</module>
+ <module>core-api</module>
<module>impl</module>
<module>porting-package</module>
<module>jboss-tck-runner</module>
Modified: ri/trunk/version-matrix/pom.xml
===================================================================
--- ri/trunk/version-matrix/pom.xml 2009-03-16 12:24:23 UTC (rev 2037)
+++ ri/trunk/version-matrix/pom.xml 2009-03-16 13:14:48 UTC (rev 2038)
@@ -209,6 +209,12 @@
<dependency>
<groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-api</artifactId>
+ <version>${webbeans.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-core</artifactId>
<version>${webbeans.version}</version>
</dependency>
15 years, 10 months