Seam SVN: r12500 - modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-04-15 00:15:34 -0400 (Thu, 15 Apr 2010)
New Revision: 12500
Modified:
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
Log:
automatically add @Default when required to generic beans
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-04-15 04:04:53 UTC (rev 12499)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-04-15 04:15:34 UTC (rev 12500)
@@ -17,7 +17,9 @@
import java.util.Map.Entry;
import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Default;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.Annotated;
import javax.enterprise.inject.spi.AnnotatedConstructor;
import javax.enterprise.inject.spi.AnnotatedField;
import javax.enterprise.inject.spi.AnnotatedMethod;
@@ -29,6 +31,7 @@
import javax.enterprise.inject.spi.ProcessAnnotatedType;
import javax.enterprise.inject.spi.ProcessInjectionTarget;
import javax.enterprise.util.AnnotationLiteral;
+import javax.inject.Named;
import org.jboss.seam.xml.annotations.internal.ApplyQualifiers;
import org.jboss.seam.xml.core.BeanResult;
@@ -301,6 +304,11 @@
AnnotatedType<?> type = c.getBuilder().create();
NewAnnotatedTypeBuilder<?> gb = new NewAnnotatedTypeBuilder(type);
+ //if the original type was qualified @Default we add that as well
+ if(!isQualifierPresent(type, beanManager))
+ {
+ gb.addToClass( new DefaultLiteral());
+ }
// we always apply qualifiers to the actual type
for (Annotation q : qualifiers)
{
@@ -309,7 +317,14 @@
for (AnnotatedField<?> f : type.getFields())
{
if (f.isAnnotationPresent(ApplyQualifiers.class))
- {
+ {
+ //we need to manually add @default as it stops being applied when
+ //we add our qualifiers, however if we are deling with the main type we do not
+ //bother, as it should not be qualified @Default
+ if(!isQualifierPresent(f, beanManager) && f.getJavaMember().getType() != rootType.getJavaClass())
+ {
+ gb.addToField(f.getJavaMember(), new DefaultLiteral());
+ }
for (Annotation q : qualifiers)
{
gb.addToField(f.getJavaMember(), q);
@@ -318,8 +333,14 @@
}
for (AnnotatedMethod<?> m : type.getMethods())
{
+
if (m.isAnnotationPresent(ApplyQualifiers.class))
{
+
+ if(!isQualifierPresent(m, beanManager))
+ {
+ gb.addToMethod(m.getJavaMember(), new DefaultLiteral());
+ }
for (Annotation q : qualifiers)
{
gb.addToMethod(m.getJavaMember(), q);
@@ -328,8 +349,13 @@
for (AnnotatedParameter<?> p : m.getParameters())
{
+
if (p.isAnnotationPresent(ApplyQualifiers.class))
{
+ if(!isQualifierPresent(p, beanManager) && p.getBaseType() != rootType.getJavaClass())
+ {
+ gb.addToMethodParameter(m.getJavaMember(),p.getPosition(), new DefaultLiteral());
+ }
for (Annotation q : qualifiers)
{
gb.addToMethodParameter(m.getJavaMember(), p.getPosition(), q);
@@ -342,6 +368,10 @@
{
if (con.isAnnotationPresent(ApplyQualifiers.class))
{
+ if(!isQualifierPresent(con, beanManager))
+ {
+ gb.addToConstructor((Constructor) con.getJavaMember(), new DefaultLiteral());
+ }
for (Annotation q : qualifiers)
{
gb.addToConstructor((Constructor) con.getJavaMember(), q);
@@ -350,8 +380,12 @@
for (AnnotatedParameter<?> p : con.getParameters())
{
- if (p.isAnnotationPresent(ApplyQualifiers.class))
+ if (p.isAnnotationPresent(ApplyQualifiers.class) && p.getBaseType() != rootType.getJavaClass())
{
+ if(!isQualifierPresent(p, beanManager))
+ {
+ gb.addToConstructorParameter((Constructor) con.getJavaMember(),p.getPosition(), new DefaultLiteral());
+ }
for (Annotation q : qualifiers)
{
gb.addToConstructorParameter((Constructor) con.getJavaMember(), p.getPosition(), q);
@@ -364,4 +398,22 @@
}
return ret;
}
+
+ public boolean isQualifierPresent(Annotated f, BeanManager beanManager)
+ {
+ for(Annotation a : f.getAnnotations())
+ {
+ if(a.annotationType().equals(Named.class))
+ {
+ continue;
+ }
+ if(beanManager.isQualifier(a.annotationType()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static class DefaultLiteral extends AnnotationLiteral<Default> implements Default {};
}
16 years
Seam SVN: r12499 - in modules/drools/trunk: api/src/main/java/org/jboss/seam/drools/events and 14 other directories.
by seam-commits@lists.jboss.org
Author: tsurdilovic
Date: 2010-04-15 00:04:53 -0400 (Thu, 15 Apr 2010)
New Revision: 12499
Modified:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/TemplateDataProvider.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/events/KnowledgeBuilderErrorsEvent.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/events/RuleResourceAddedEvent.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KBaseEventListener.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KSessionEventListener.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Scanned.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/TemplateData.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/WIHandler.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/ExcecutionResultsProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeAgentProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeLoggerProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/Abort.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/SignalEvent.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/StartProcess.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/bootstrap/DroolsExtension.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/config/DroolsConfiguration.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertInterceptor.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/qualifiers/config/DroolsConfig.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/utils/ConfigUtils.java
modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestRules.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyKnowledgeBaseEventListener.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/SimpleTemplateDataProvider.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestRules.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyDummyWorkItemHandler.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyKnowledgeSessionEventListener.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MySecondKnowledgeBaseEventListener.java
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml
Log:
added license header to .java and .xml
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/TemplateDataProvider.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/TemplateDataProvider.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/TemplateDataProvider.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools;
import static java.lang.annotation.ElementType.TYPE;
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/events/KnowledgeBuilderErrorsEvent.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/events/KnowledgeBuilderErrorsEvent.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/events/KnowledgeBuilderErrorsEvent.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.events;
import org.drools.builder.KnowledgeBuilderErrors;
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/events/RuleResourceAddedEvent.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/events/RuleResourceAddedEvent.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/events/RuleResourceAddedEvent.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.events;
/**
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.qualifiers;
import static java.lang.annotation.ElementType.FIELD;
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KBaseEventListener.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KBaseEventListener.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KBaseEventListener.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.qualifiers;
import static java.lang.annotation.ElementType.FIELD;
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KSessionEventListener.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KSessionEventListener.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KSessionEventListener.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.qualifiers;
import static java.lang.annotation.ElementType.FIELD;
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.qualifiers;
import static java.lang.annotation.ElementType.FIELD;
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Scanned.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Scanned.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Scanned.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.qualifiers;
import static java.lang.annotation.ElementType.FIELD;
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/TemplateData.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/TemplateData.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/TemplateData.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.qualifiers;
import static java.lang.annotation.ElementType.TYPE;
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/WIHandler.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/WIHandler.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/WIHandler.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.qualifiers;
import static java.lang.annotation.ElementType.FIELD;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools;
import javax.enterprise.inject.Produces;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/ExcecutionResultsProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/ExcecutionResultsProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/ExcecutionResultsProducer.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools;
public class ExcecutionResultsProducer
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeAgentProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeAgentProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeAgentProducer.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools;
import java.util.Properties;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools;
import java.io.InputStream;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeLoggerProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeLoggerProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeLoggerProducer.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools;
import javax.enterprise.inject.Disposes;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools;
import java.util.Iterator;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools;
import javax.enterprise.inject.Produces;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.annotations;
import static java.lang.annotation.ElementType.METHOD;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/Abort.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/Abort.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/Abort.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.annotations.flow;
import static java.lang.annotation.ElementType.METHOD;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/SignalEvent.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/SignalEvent.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/SignalEvent.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.annotations.flow;
import static java.lang.annotation.ElementType.METHOD;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/StartProcess.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/StartProcess.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/flow/StartProcess.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.annotations.flow;
import static java.lang.annotation.ElementType.TYPE;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/bootstrap/DroolsExtension.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/bootstrap/DroolsExtension.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/bootstrap/DroolsExtension.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.bootstrap;
import java.util.HashMap;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/config/DroolsConfiguration.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/config/DroolsConfiguration.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/config/DroolsConfiguration.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.config;
import org.jboss.seam.drools.qualifiers.config.DroolsConfig;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertInterceptor.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertInterceptor.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertInterceptor.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.interceptor;
import javax.interceptor.AroundInvoke;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/qualifiers/config/DroolsConfig.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/qualifiers/config/DroolsConfig.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/qualifiers/config/DroolsConfig.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.qualifiers.config;
import static java.lang.annotation.ElementType.FIELD;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/utils/ConfigUtils.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/utils/ConfigUtils.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/utils/ConfigUtils.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.utils;
import java.io.InputStream;
Modified: modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml
===================================================================
--- modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc., and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:java:seam:core"
xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.kbase;
import static org.junit.Assert.assertNotNull;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.kbase;
import org.jboss.shrinkwrap.api.Filter;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestRules.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestRules.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestRules.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.kbase;
import static java.lang.annotation.ElementType.FIELD;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyKnowledgeBaseEventListener.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyKnowledgeBaseEventListener.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyKnowledgeBaseEventListener.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.kbase;
import org.drools.event.knowledgebase.DefaultKnowledgeBaseEventListener;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/SimpleTemplateDataProvider.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/SimpleTemplateDataProvider.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/SimpleTemplateDataProvider.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.kbase;
import java.util.ArrayList;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.ksession;
import static org.junit.Assert.assertNotNull;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.ksession;
import org.jboss.shrinkwrap.api.Filter;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestRules.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestRules.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestRules.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.ksession;
import static java.lang.annotation.ElementType.FIELD;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyDummyWorkItemHandler.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyDummyWorkItemHandler.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyDummyWorkItemHandler.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.ksession;
import org.drools.runtime.process.WorkItem;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyKnowledgeSessionEventListener.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyKnowledgeSessionEventListener.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyKnowledgeSessionEventListener.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.ksession;
import org.drools.event.process.ProcessCompletedEvent;
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MySecondKnowledgeBaseEventListener.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MySecondKnowledgeBaseEventListener.java 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MySecondKnowledgeBaseEventListener.java 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.seam.drools.test.ksession;
import org.drools.event.knowledgebase.DefaultKnowledgeBaseEventListener;
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc., and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:java:seam:core"
xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml 2010-04-15 03:21:31 UTC (rev 12498)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml 2010-04-15 04:04:53 UTC (rev 12499)
@@ -1,3 +1,24 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc., and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:java:seam:core"
xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
16 years
Seam SVN: r12498 - in modules/drools/trunk: impl/src/main/java/org/jboss/seam/drools and 6 other directories.
by seam-commits@lists.jboss.org
Author: tsurdilovic
Date: 2010-04-14 23:21:31 -0400 (Wed, 14 Apr 2010)
New Revision: 12498
Added:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Scanned.java
modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestRules.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestRules.java
Removed:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KAgentConfigured.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KBaseConfigured.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/insertion/
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestQualifier.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestQualifier.java
Modified:
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeAgentProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeLoggerProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/ksessiontest.drl
Log:
new code added using <s:ApplyQualifiers /> xml config.
Added: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java (rev 0)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -0,0 +1,28 @@
+package org.jboss.seam.drools.qualifiers;
+
+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.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.util.Nonbinding;
+import javax.inject.Qualifier;
+
+/**
+ *
+ * @author Tihomir Surdilovic
+ */
+@Qualifier
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface EntryPoint {
+ @Nonbinding String value() default "";
+}
Deleted: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KAgentConfigured.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KAgentConfigured.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KAgentConfigured.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1,29 +0,0 @@
-package org.jboss.seam.drools.qualifiers;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-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.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Qualifier for Drools KnowledgeBase configured for KnowledgeAgent.
- *
- * @author Tihomir Surdilovic
- */
-@Qualifier
-@Target( { TYPE, METHOD, FIELD, PARAMETER })
-@Documented
-@Retention(RUNTIME)
-@Inherited
-public @interface KAgentConfigured
-{
-
-}
Deleted: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KBaseConfigured.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KBaseConfigured.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/KBaseConfigured.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1,29 +0,0 @@
-package org.jboss.seam.drools.qualifiers;
-
-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.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Qualifier for Drools KnowledgeBase default configuration.
- *
- * @author Tihomir Surdilovic
- */
-@Qualifier
-@Target( { TYPE, METHOD, FIELD, PARAMETER })
-@Documented
-@Retention(RUNTIME)
-@Inherited
-public @interface KBaseConfigured
-{
-
-}
Added: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java (rev 0)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -0,0 +1,28 @@
+package org.jboss.seam.drools.qualifiers;
+
+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.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.util.Nonbinding;
+import javax.inject.Qualifier;
+
+/**
+ *
+ * @author Tihomir Surdilovic
+ */
+@Qualifier
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface Query {
+ @Nonbinding String value() default "";
+}
Added: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Scanned.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Scanned.java (rev 0)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Scanned.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -0,0 +1,27 @@
+package org.jboss.seam.drools.qualifiers;
+
+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.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ *
+ * @author Tihomir Surdilovic
+ */
+@Qualifier
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface Scanned {
+
+}
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1,12 +1,14 @@
package org.jboss.seam.drools;
-import javax.enterprise.inject.Instance;
import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.WorkingMemoryEntryPoint;
-import org.jboss.seam.drools.qualifiers.KAgentConfigured;
-import org.jboss.seam.drools.qualifiers.KBaseConfigured;
+import org.jboss.seam.drools.qualifiers.EntryPoint;
+import org.jboss.seam.drools.qualifiers.Scanned;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*
@@ -14,12 +16,39 @@
*/
public class EntryPointProducer
{
- @Produces @KBaseConfigured WorkingMemoryEntryPoint produceEntryPoint(@KBaseConfigured StatefulKnowledgeSession ksession, Instance<String> entryPointNameInstance) {
- return ksession.getWorkingMemoryEntryPoint(entryPointNameInstance.get());
+ private static final Logger log = LoggerFactory.getLogger(EntryPointProducer.class);
+
+ @Produces
+ @EntryPoint
+ public WorkingMemoryEntryPoint produceEntryPoint(StatefulKnowledgeSession ksession, InjectionPoint ip) throws Exception
+ {
+ String entryPointName = ip.getAnnotated().getAnnotation(EntryPoint.class).value();
+ if (entryPointName != null && entryPointName.length() > 0)
+ {
+ log.debug("EntryPoint Name requested: " + entryPointName);
+ return ksession.getWorkingMemoryEntryPoint(entryPointName);
+ }
+ else
+ {
+ throw new IllegalStateException("EntryPoint must have a name.");
+ }
}
-
- @Produces @KAgentConfigured WorkingMemoryEntryPoint produceKAgentEntryPoint(@KAgentConfigured StatefulKnowledgeSession ksession, Instance<String> entryPointNameInstance) {
- return ksession.getWorkingMemoryEntryPoint(entryPointNameInstance.get());
+
+ @Produces
+ @EntryPoint
+ @Scanned
+ public WorkingMemoryEntryPoint produceScannedEntryPoint(@Scanned StatefulKnowledgeSession ksession, InjectionPoint ip) throws Exception
+ {
+ String entryPointName = ip.getAnnotated().getAnnotation(EntryPoint.class).value();
+ if (entryPointName != null && entryPointName.length() > 0)
+ {
+ log.debug("EntryPoint Name requested: " + entryPointName);
+ return ksession.getWorkingMemoryEntryPoint(ip.getAnnotated().getAnnotation(EntryPoint.class).value());
+ }
+ else
+ {
+ throw new IllegalStateException("EntryPoint must have a name.");
+ }
}
-
+
}
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeAgentProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeAgentProducer.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeAgentProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -2,9 +2,7 @@
import java.util.Properties;
-import javax.enterprise.inject.Any;
import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Instance;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
@@ -18,8 +16,7 @@
import org.drools.io.ResourceFactory;
import org.jboss.seam.drools.config.DroolsConfiguration;
import org.jboss.seam.drools.events.RuleResourceAddedEvent;
-import org.jboss.seam.drools.qualifiers.KAgentConfigured;
-import org.jboss.seam.drools.qualifiers.config.DroolsConfig;
+import org.jboss.seam.drools.qualifiers.Scanned;
import org.jboss.seam.drools.utils.ConfigUtils;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.slf4j.Logger;
@@ -39,10 +36,9 @@
ResourceProvider resourceProvider;
@Produces
- @KAgentConfigured
- KnowledgeBase produceAgentKBase(Instance<DroolsConfiguration> kagentConfigInstance) throws Exception
+ @Scanned
+ public KnowledgeBase produceScannedKnowledgeBase(DroolsConfiguration kagentConfig) throws Exception
{
- DroolsConfiguration kagentConfig = kagentConfigInstance.get();
ResourceFactory.getResourceChangeScannerService().configure(getResourceChangeScannerConfig(kagentConfig.getResourceChangeScannerConfigPath()));
KnowledgeAgentConfiguration aconf = getKnowledgeAgentConfiguration(kagentConfig.getKnowledgeAgentConfigPath());
@@ -61,7 +57,7 @@
}
- public void disposeAgentKBase(@Disposes @KAgentConfigured KnowledgeBase kbase) {
+ public void disposeScannedKnowledgeBase(@Disposes @Scanned KnowledgeBase kbase) {
ResourceFactory.getResourceChangeNotifierService().stop();
ResourceFactory.getResourceChangeScannerService().stop();
}
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -26,7 +26,6 @@
import org.jboss.seam.drools.config.DroolsConfiguration;
import org.jboss.seam.drools.events.KnowledgeBuilderErrorsEvent;
import org.jboss.seam.drools.events.RuleResourceAddedEvent;
-import org.jboss.seam.drools.qualifiers.KBaseConfigured;
import org.jboss.seam.drools.utils.ConfigUtils;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.slf4j.Logger;
@@ -42,14 +41,15 @@
@Inject
BeanManager manager;
+
@Inject
ResourceProvider resourceProvider;
+
@Inject
DroolsExtension droolsExtension;
@Produces
- @KBaseConfigured
- public KnowledgeBase produceKBase(DroolsConfiguration kbaseConfig) throws Exception
+ public KnowledgeBase produceKnowledgeBase(DroolsConfiguration kbaseConfig) throws Exception
{
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(getKnowledgeBuilderConfiguration(kbaseConfig.getKnowledgeBuilderConfigPath()));
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeLoggerProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeLoggerProducer.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeLoggerProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1,7 +1,6 @@
package org.jboss.seam.drools;
import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Instance;
import javax.enterprise.inject.Produces;
import org.drools.event.KnowledgeRuntimeEventManager;
@@ -10,8 +9,7 @@
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.StatelessKnowledgeSession;
import org.jboss.seam.drools.config.DroolsConfiguration;
-import org.jboss.seam.drools.qualifiers.KAgentConfigured;
-import org.jboss.seam.drools.qualifiers.KBaseConfigured;
+import org.jboss.seam.drools.qualifiers.Scanned;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -24,31 +22,29 @@
private static final Logger log = LoggerFactory.getLogger(KnowledgeLoggerProducer.class);
@Produces
- @KBaseConfigured
- public KnowledgeRuntimeLogger produceStatefulKnowledgeLogger(@KBaseConfigured StatefulKnowledgeSession ksession, Instance<DroolsConfiguration> loggerConfigInstance)
+ public KnowledgeRuntimeLogger produceStatefulKnowledgeLogger(StatefulKnowledgeSession ksession, DroolsConfiguration loggerConfig)
{
- return getLogger(ksession, loggerConfigInstance.get());
+ return getLogger(ksession, loggerConfig);
}
@Produces
- @KAgentConfigured
- public KnowledgeRuntimeLogger produceStatefulKnowledgeLoggerForKAgent(@KAgentConfigured StatefulKnowledgeSession ksession, Instance<DroolsConfiguration> loggerConfigInstance)
+ @Scanned
+ public KnowledgeRuntimeLogger produceScannedStatefulKnowledgeLogger(@Scanned StatefulKnowledgeSession ksession, DroolsConfiguration loggerConfig)
{
- return getLogger(ksession, loggerConfigInstance.get());
+ return getLogger(ksession, loggerConfig);
}
@Produces
- @KBaseConfigured
- public KnowledgeRuntimeLogger produceStatelessKnowledgeLogger(@KBaseConfigured StatelessKnowledgeSession ksession, Instance<DroolsConfiguration> loggerConfigInstance)
+ public KnowledgeRuntimeLogger produceStatelessKnowledgeLogger(StatelessKnowledgeSession ksession, DroolsConfiguration loggerConfig)
{
- return getLogger(ksession, loggerConfigInstance.get());
+ return getLogger(ksession, loggerConfig);
}
@Produces
- @KAgentConfigured
- public KnowledgeRuntimeLogger produceStatelessKnowledgeLoggerForKAgent(@KAgentConfigured StatelessKnowledgeSession ksession, Instance<DroolsConfiguration> loggerConfigInstance)
+ @Scanned
+ public KnowledgeRuntimeLogger produceStatelessKnowledgeLoggerForKAgent(@Scanned StatelessKnowledgeSession ksession, DroolsConfiguration loggerConfig)
{
- return getLogger(ksession, loggerConfigInstance.get());
+ return getLogger(ksession, loggerConfig);
}
private KnowledgeRuntimeLogger getLogger(KnowledgeRuntimeEventManager ksession, DroolsConfiguration loggerConfig)
@@ -75,12 +71,12 @@
return krLogger;
}
- public void disposeKBaseConfiguredKnowledgeLogger(@Disposes @KBaseConfigured KnowledgeRuntimeLogger logger)
+ public void disposeKnowledgeRuntimeLogger(@Disposes KnowledgeRuntimeLogger logger)
{
logger.close();
}
- public void disposeKAgentConfiguredKnowledgeLogger(@Disposes @KAgentConfigured KnowledgeRuntimeLogger logger) {
+ public void disposeScannedKnowledgeRuntimeLogger(@Disposes @Scanned KnowledgeRuntimeLogger logger) {
logger.close();
}
}
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -3,9 +3,7 @@
import java.util.Iterator;
import java.util.Properties;
-import javax.enterprise.inject.Any;
import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Instance;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
@@ -21,8 +19,7 @@
import org.drools.runtime.StatelessKnowledgeSession;
import org.jboss.seam.drools.bootstrap.DroolsExtension;
import org.jboss.seam.drools.config.DroolsConfiguration;
-import org.jboss.seam.drools.qualifiers.KAgentConfigured;
-import org.jboss.seam.drools.qualifiers.KBaseConfigured;
+import org.jboss.seam.drools.qualifiers.Scanned;
import org.jboss.seam.drools.utils.ConfigUtils;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.slf4j.Logger;
@@ -38,14 +35,15 @@
@Inject
BeanManager manager;
+
@Inject
ResourceProvider resourceProvider;
+
@Inject
DroolsExtension droolsExtension;
@Produces
- @KBaseConfigured
- public StatefulKnowledgeSession produceStatefulSession(@KBaseConfigured KnowledgeBase kbase, @Any DroolsConfiguration ksessionConfig) throws Exception
+ public StatefulKnowledgeSession produceStatefulSession(KnowledgeBase kbase,DroolsConfiguration ksessionConfig) throws Exception
{
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(getConfig(ksessionConfig.getKnowledgeSessionConfigPath()), null);
addEventListeners(ksession);
@@ -55,8 +53,8 @@
}
@Produces
- @KAgentConfigured
- StatefulKnowledgeSession produceStatefulSessionFromKAgent(@KAgentConfigured KnowledgeBase kbase, @Any DroolsConfiguration ksessionConfig) throws Exception
+ @Scanned
+ public StatefulKnowledgeSession produceScannedStatefulSession(@Scanned KnowledgeBase kbase, DroolsConfiguration ksessionConfig) throws Exception
{
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(getConfig(ksessionConfig.getKnowledgeSessionConfigPath()), null);
addEventListeners(ksession);
@@ -66,8 +64,8 @@
}
@Produces
- @KAgentConfigured
- StatelessKnowledgeSession produceStatelessSessionFromKAgent(@KAgentConfigured KnowledgeBase kbase, @Any DroolsConfiguration ksessionConfig) throws Exception
+ @Scanned
+ public StatelessKnowledgeSession produceScannedStatelessSession(@Scanned KnowledgeBase kbase, DroolsConfiguration ksessionConfig) throws Exception
{
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(getConfig(ksessionConfig.getKnowledgeSessionConfigPath()));
addEventListeners(ksession);
@@ -76,8 +74,7 @@
}
@Produces
- @KBaseConfigured
- public StatelessKnowledgeSession produceStatelessSession(@KBaseConfigured KnowledgeBase kbase, @Any DroolsConfiguration ksessionConfig) throws Exception
+ public StatelessKnowledgeSession produceStatelessSession(KnowledgeBase kbase, DroolsConfiguration ksessionConfig) throws Exception
{
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(getConfig(ksessionConfig.getKnowledgeSessionConfigPath()));
addEventListeners(ksession);
@@ -85,11 +82,12 @@
return ksession;
}
- public void disposeStatefulSession(@Disposes @Any StatefulKnowledgeSession session)
+ public void disposeStatefulSession(@Disposes StatefulKnowledgeSession session)
{
session.dispose();
}
-
+
+
private KnowledgeSessionConfiguration getConfig(String knowledgeSessionConfigPath) throws Exception
{
KnowledgeSessionConfiguration droolsKsessionConfig = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1,9 +1,12 @@
package org.jboss.seam.drools;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.inject.Inject;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
-import org.jboss.weld.extensions.resources.ResourceProvider;
+import org.drools.runtime.StatefulKnowledgeSession;
+import org.drools.runtime.rule.QueryResults;
+import org.jboss.seam.drools.qualifiers.Query;
+import org.jboss.seam.drools.qualifiers.Scanned;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -13,10 +16,37 @@
*/
public class QueryResultsProducer
{
- private static final Logger log = LoggerFactory.getLogger(KnowledgeBaseProducer.class);
+ private static final Logger log = LoggerFactory.getLogger(QueryResultsProducer.class);
- @Inject
- BeanManager manager;
- @Inject
- ResourceProvider resourceProvider;
+ @Produces
+ @Query
+ public QueryResults produceQueryResults(StatefulKnowledgeSession ksession, InjectionPoint ip)
+ {
+ String queryName = ip.getAnnotated().getAnnotation(Query.class).value();
+ if (queryName != null && queryName.length() > 0)
+ {
+ log.debug("Query Name requested: " + queryName);
+ return ksession.getQueryResults(queryName);
+ }
+ else
+ {
+ throw new IllegalStateException("Query must have a name.");
+ }
+ }
+
+ @Produces
+ @Query
+ @Scanned
+ public QueryResults produceScannedQueryResults(@Scanned StatefulKnowledgeSession ksession, InjectionPoint ip) {
+ String queryName = ip.getAnnotated().getAnnotation(Query.class).value();
+ if (queryName != null && queryName.length() > 0)
+ {
+ log.debug("Query Name requested: " + queryName);
+ return ksession.getQueryResults(queryName);
+ }
+ else
+ {
+ throw new IllegalStateException("Query must have a name.");
+ }
+ }
}
Added: modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml
===================================================================
--- modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml (rev 0)
+++ modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml 2010-04-15 03:21:31 UTC (rev 12498)
@@ -0,0 +1,189 @@
+<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:seam:core"
+ xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
+ xmlns:drools="urn:java:org.drools:org.drools.runtime">
+
+ <s:genericBean class="org.jboss.seam.drools.config.DroolsConfiguration">
+ <d:KnowledgeBaseProducer>
+ <s:specializes />
+ <d:produceKnowledgeBase>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <d:DroolsConfiguration>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceKnowledgeBase>
+ </d:KnowledgeBaseProducer>
+
+ <d:KnowledgeSessionProducer>
+ <s:specializes />
+ <d:produceStatefulSession>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:KnowledgeBase>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:KnowledgeBase>
+ <d:DroolsConfiguration>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceStatefulSession>
+ <d:disposeStatefulSession>
+ <s:parameters>
+ <drools:StatefulKnowledgeSession>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:StatefulKnowledgeSession>
+ </s:parameters>
+ </d:disposeStatefulSession>
+ <d:produceScannedStatefulSession>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:KnowledgeBase>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:KnowledgeBase>
+ <d:DroolsConfiguration>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceScannedStatefulSession>
+ <!--<d:disposeScannedStatefulSession>
+ <s:parameters>
+ <drools:StatefulKnowledgeSession>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:StatefulKnowledgeSession>
+ </s:parameters>
+ </d:disposeScannedStatefulSession>
+ --><d:produceStatelessSession>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:KnowledgeBase>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:KnowledgeBase>
+ <d:DroolsConfiguration>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceStatelessSession>
+ <d:produceScannedStatelessSession>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:KnowledgeBase>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:KnowledgeBase>
+ <d:DroolsConfiguration>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceScannedStatelessSession>
+ </d:KnowledgeSessionProducer>
+
+ <d:KnowledgeAgentProducer>
+ <s:specializes />
+ <d:produceScannedKnowledgeBase>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <d:DroolsConfiguration>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceScannedKnowledgeBase>
+ <d:disposeScannedKnowledgeBase>
+ <s:parameters>
+ <drools:KnowledgeBase>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:KnowledgeBase>
+ </s:parameters>
+ </d:disposeScannedKnowledgeBase>
+ </d:KnowledgeAgentProducer>
+
+ <d:EntryPointProducer>
+ <s:specializes />
+ <d:produceEntryPoint>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:StatefulKnowledgeSession>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:StatefulKnowledgeSession>
+ </s:parameters>
+ </d:produceEntryPoint>
+ <d:produceScannedEntryPoint>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:StatefulKnowledgeSession>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:StatefulKnowledgeSession>
+ </s:parameters>
+ </d:produceScannedEntryPoint>
+ </d:EntryPointProducer>
+
+ <d:KnowledgeLoggerProducer>
+ <s:specializes />
+ <d:produceStatefulKnowledgeLogger>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:StatefulKnowledgeSession>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:StatefulKnowledgeSession>
+ <d:DroolsConfiguration>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceStatefulKnowledgeLogger>
+ <d:produceScannedStatefulKnowledgeLogger>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:StatefulKnowledgeSession>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:StatefulKnowledgeSession>
+ <d:DroolsConfiguration>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceScannedStatefulKnowledgeLogger>
+ </d:KnowledgeLoggerProducer>
+
+ <d:QueryResultsProducer>
+ <s:specializes />
+ <d:produceQueryResults>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:StatefulKnowledgeSession>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:StatefulKnowledgeSession>
+ </s:parameters>
+ </d:produceQueryResults>
+ <d:produceScannedQueryResults>
+ <s:ApplyQualifiers />
+ <s:parameters>
+ <drools:StatefulKnowledgeSession>
+ <s:Inject />
+ <s:ApplyQualifiers />
+ </drools:StatefulKnowledgeSession>
+ </s:parameters>
+ </d:produceScannedQueryResults>
+ </d:QueryResultsProducer>
+
+ </s:genericBean>
+
+</beans>
\ No newline at end of file
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -9,8 +9,6 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
-import org.jboss.seam.drools.config.DroolsConfiguration;
-import org.jboss.seam.drools.qualifiers.KBaseConfigured;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.Archives;
import org.jboss.shrinkwrap.api.formatter.Formatters;
@@ -29,7 +27,7 @@
JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
.addPackages(true, new KBaseTestFilter(), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
- .addClass(KBaseTestQualifier.class)
+ .addClass(KBaseTestRules.class)
.addClass(MyKnowledgeBaseEventListener.class)
.addResource(pkgPath + "/kbasetest.drl", ArchivePaths.create("kbasetest.drl"))
.addResource(pkgPath + "/kbuilderconfig.properties", ArchivePaths.create("kbuilderconfig.properties"))
@@ -39,44 +37,12 @@
return archive;
}
- @Inject
- @KBaseTestQualifier
- DroolsConfiguration config;
+ @Inject @KBaseTestRules KnowledgeBase kbase;
- @Inject
- @KBaseTestQualifier
- @KBaseConfigured
- KnowledgeBase kbase;
-
@Test
- public void testKBaseConfig()
- {
- // Assert.assertFalse(kbaseConfigResolver.select(new
- // KBaseConfigBinding("kbaseconfig1")).isUnsatisfied());
- // KnowledgeBaseConfig kbaseConfig = kbaseConfigResolver.select(new
- // KBaseConfigBinding("kbaseconfig1")).get();
- assertNotNull(config);
- System.out.println("\n\n\n**** " + config.toString() + "********\n\n\n");
- }
-
- @Test
public void testKBase()
{
assertNotNull(kbase);
assertTrue(kbase.getKnowledgePackage("org.jboss.seam.drools.test.kbase").getRules().size() == 3);
}
-
- // static class KBaseConfigBinding extends AnnotationLiteral<ForKBaseTest>
- // implements KBaseConfig
- // {
- // private String value = null;
- // public KBaseConfigBinding(String value)
- // {
- // this.value = value;
- // }
- //
- // public String value() {
- // return value;
- // }
- // }
}
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestQualifier.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestQualifier.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestQualifier.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1,25 +0,0 @@
-package org.jboss.seam.drools.test.kbase;
-
-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.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-@Target( { TYPE, METHOD, FIELD, PARAMETER })
-@Documented
-@Retention(RUNTIME)
-@Inherited
-public @interface KBaseTestQualifier
-{
-
-}
Copied: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestRules.java (from rev 12495, modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestQualifier.java)
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestRules.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestRules.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -0,0 +1,24 @@
+package org.jboss.seam.drools.test.kbase;
+
+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.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface KBaseTestRules
+{
+
+}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -9,7 +9,6 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
-import org.jboss.seam.drools.qualifiers.KBaseConfigured;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.Archives;
import org.jboss.shrinkwrap.api.formatter.Formatters;
@@ -28,7 +27,7 @@
JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
.addPackages(true, new KSessionTestFiler(), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
- .addClass(KSessionTestQualifier.class)
+ .addClass(KSessionTestRules.class)
.addResource(pkgPath + "/ksessiontest.drl", ArchivePaths.create("ksessiontest.drl"))
.addResource(pkgPath + "/kbuilderconfig.properties", ArchivePaths.create("kbuilderconfig.properties"))
.addResource(pkgPath + "/kbaseconfig.properties", ArchivePaths.create("kbaseconfig.properties"))
@@ -37,14 +36,12 @@
return archive;
}
- @Inject
- @KSessionTestQualifier
- @KBaseConfigured
- StatefulKnowledgeSession ksession;
+ @Inject @KSessionTestRules StatefulKnowledgeSession ksession;
@Test
public void testKSession()
{
assertNotNull(ksession);
+ assertTrue(ksession.getId() >= 0);
}
}
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestQualifier.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestQualifier.java 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestQualifier.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1,24 +0,0 @@
-package org.jboss.seam.drools.test.ksession;
-
-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.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-@Target( { TYPE, METHOD, FIELD, PARAMETER })
-@Documented
-@Retention(RUNTIME)
-@Inherited
-public @interface KSessionTestQualifier
-{
-
-}
Copied: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestRules.java (from rev 12495, modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestQualifier.java)
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestRules.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestRules.java 2010-04-15 03:21:31 UTC (rev 12498)
@@ -0,0 +1,24 @@
+package org.jboss.seam.drools.test.ksession;
+
+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.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface KSessionTestRules
+{
+
+}
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1,44 +1,16 @@
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:drools="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
- xmlns:test="urn:java:org.jboss.seam.drools.test.kbase">
+<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:seam:core"
+ xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
+ xmlns:test="urn:java:org.jboss.seam.drools.test.kbase">
- <drools:DroolsConfiguration>
- <s:overrides/>
- <test:KBaseTestQualifier/>
- <drools:knowledgeBuilderConfigPath>kbuilderconfig.properties</drools:knowledgeBuilderConfigPath>
- <drools:knowledgeBaseConfigPath>kbaseconfig.properties</drools:knowledgeBaseConfigPath>
- <drools:ruleResources>
- <s:value>classpath;kbasetest.drl;DRL;forkbasetest</s:value>
- </drools:ruleResources>
- </drools:DroolsConfiguration>
- <drools:KnowledgeBaseProducer>
- <s:specializes/>
- <drools:produceKBase>
- <test:KBaseTestQualifier/>
- <s:parameters>
- <drools:DroolsConfiguration>
- <s:Inject/>
- <test:KBaseTestQualifier/>
- </drools:DroolsConfiguration>
- </s:parameters>
- </drools:produceKBase>
- </drools:KnowledgeBaseProducer>
-
- <!--
- WITH LATEST WELD-EXTENSION AND Instance<XYZ> zyx param in producer!
- <drools:KnowledgeBaseProducer>
- <s:specializes/>
- <drools:produceKBase>
- <test:KBaseTestQualifier/>
- <s:parameters>
- <s:Instance>
- <s:Inject/>
- <test:KBaseTestQualifier/>
- </s:Instance>
- </s:parameters>
- </drools:produceKBase>
- </drools:KnowledgeBaseProducer> -->
+ <d:DroolsConfiguration>
+ <test:KBaseTestRules />
+ <d:knowledgeBuilderConfigPath>kbuilderconfig.properties</d:knowledgeBuilderConfigPath>
+ <d:knowledgeBaseConfigPath>kbaseconfig.properties</d:knowledgeBaseConfigPath>
+ <d:ruleResources>
+ <s:value>classpath;kbasetest.drl;DRL;forkbasetest</s:value>
+ </d:ruleResources>
+ </d:DroolsConfiguration>
+
</beans>
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1,47 +1,16 @@
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
- xmlns:drools="urn:java:org.drools:org.drools.runtime"
- xmlns:test="urn:java:org.jboss.seam.drools.test.ksession">
+<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:seam:core"
+ xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
+ xmlns:test="urn:java:org.jboss.seam.drools.test.ksession">
- <d:DroolsConfiguration>
- <s:overrides/>
- <test:KSessionTestQualifier/>
- <d:knowledgeBuilderConfigPath>kbuilderconfig.properties</d:knowledgeBuilderConfigPath>
- <d:knowledgeBaseConfigPath>kbaseconfig.properties</d:knowledgeBaseConfigPath>
- <d:ruleResources>
- <s:value>classpath;ksessiontest.drl;DRL</s:value>
- </d:ruleResources>
- </d:DroolsConfiguration>
-
- <d:KnowledgeBaseProducer>
- <s:specializes/>
- <d:produceKBase>
- <test:KSessionTestQualifier/>
- <s:parameters>
- <d:DroolsConfiguration>
- <s:Inject/>
- <test:KSessionTestQualifier/>
- </d:DroolsConfiguration>
- </s:parameters>
- </d:produceKBase>
- </d:KnowledgeBaseProducer>
-
- <d:KnowledgeSessionProducer>
- <s:specializes/>
- <d:produceStatefulSession>
- <test:KSessionTestQualifier/>
- <s:parameters>
- <drools:KnowledgeBase>
- <s:Inject/>
- <test:KSessionTestQualifier/>
- </drools:KnowledgeBase>
- <d:DroolsConfiguration>
- <s:Inject/>
- <test:KSessionTestQualifier/>
- </d:DroolsConfiguration>
- </s:parameters>
- </d:produceStatefulSession>
- </d:KnowledgeSessionProducer>
+ <d:DroolsConfiguration>
+ <test:KSessionTestRules />
+ <d:knowledgeBuilderConfigPath>kbuilderconfig.properties
+ </d:knowledgeBuilderConfigPath>
+ <d:knowledgeBaseConfigPath>kbaseconfig.properties
+ </d:knowledgeBaseConfigPath>
+ <d:ruleResources>
+ <s:value>classpath;ksessiontest.drl;DRL</s:value>
+ </d:ruleResources>
+ </d:DroolsConfiguration>
</beans>
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/ksessiontest.drl
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/ksessiontest.drl 2010-04-14 21:59:36 UTC (rev 12497)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/ksessiontest.drl 2010-04-15 03:21:31 UTC (rev 12498)
@@ -1 +1,6 @@
package org.jboss.seam.drools.test.ksession
+
+rule dummy
+then
+ System.out.println("hello");
+end
\ No newline at end of file
16 years
Seam SVN: r12497 - modules/faces.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-04-14 17:59:36 -0400 (Wed, 14 Apr 2010)
New Revision: 12497
Added:
modules/faces/branches/
modules/faces/tags/
Log:
add tags and branches
16 years
Seam SVN: r12496 - in modules/faces/trunk/impl/src/main: resources/META-INF/services and 1 other directory.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2010-04-14 15:01:11 -0400 (Wed, 14 Apr 2010)
New Revision: 12496
Removed:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java
modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
Log:
Don't use statics.
Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java 2010-04-14 13:37:43 UTC (rev 12495)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java 2010-04-14 19:01:11 UTC (rev 12496)
@@ -45,7 +45,6 @@
beanManagerProviders.add(ServletContextBeanManagerProvider.DEFAULT);
beanManagerProviders.add(JndiBeanManagerProvider.DEFAULT);
beanManagerProviders.add(JndiBeanManagerProvider.JBOSS_HACK);
- beanManagerProviders.add(SingletonBeanManagerProvider.DEFAULT);
}
protected BeanManager getBeanManager()
Deleted: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java 2010-04-14 13:37:43 UTC (rev 12495)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java 2010-04-14 19:01:11 UTC (rev 12496)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.faces.cdi;
-
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.Extension;
-
-/**
- * Singleton(ish) extension that observes the AfterBeanDiscovery event and stores the BeanManager for access
- * in places where injection is not available and JNDI or ServletContext access is not preferable.
- *
- * @author Nicklas Karlsson
- *
- */
-public class BeanManagerPickupExtension implements Extension
-{
- private static BeanManagerPickupExtension instance;
- private volatile BeanManager beanManager;
-
- public BeanManager getBeanManager()
- {
- return beanManager;
- }
-
- public static BeanManagerPickupExtension getInstance()
- {
- return instance;
- }
-
- public void pickupBeanManager(@Observes AfterBeanDiscovery e, BeanManager beanManager)
- {
- this.beanManager = beanManager;
- BeanManagerPickupExtension.instance = this;
- }
-}
Deleted: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java 2010-04-14 13:37:43 UTC (rev 12495)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java 2010-04-14 19:01:11 UTC (rev 12496)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.faces.cdi;
-
-import javax.enterprise.inject.spi.BeanManager;
-
-/**
- * A BeanManager provider for an extension provided singleton
- *
- * @author Nicklas Karlsson
- *
- */
-public class SingletonBeanManagerProvider implements BeanManagerProvider
-{
-
- public static final BeanManagerProvider DEFAULT = new SingletonBeanManagerProvider();
-
- @Override
- public BeanManager getBeanManager()
- {
- return BeanManagerPickupExtension.getInstance().getBeanManager();
- }
-
-}
Modified: modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
===================================================================
--- modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2010-04-14 13:37:43 UTC (rev 12495)
+++ modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2010-04-14 19:01:11 UTC (rev 12496)
@@ -1,4 +1,3 @@
org.jboss.seam.faces.context.ViewScopedExtension
org.jboss.seam.faces.context.FlashScopedExtension
org.jboss.seam.faces.context.FacesAnnotationsAdapterExtension
-org.jboss.seam.faces.cdi.BeanManagerPickupExtension
16 years
Seam SVN: r12495 - branches/community/Seam_2_2/examples/seambay/view.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-04-14 09:37:43 -0400 (Wed, 14 Apr 2010)
New Revision: 12495
Modified:
branches/community/Seam_2_2/examples/seambay/view/test.xhtml
Log:
JBSEAM-4601 - added jboss.xml for web services
Modified: branches/community/Seam_2_2/examples/seambay/view/test.xhtml
===================================================================
--- branches/community/Seam_2_2/examples/seambay/view/test.xhtml 2010-04-14 13:36:34 UTC (rev 12494)
+++ branches/community/Seam_2_2/examples/seambay/view/test.xhtml 2010-04-14 13:37:43 UTC (rev 12495)
@@ -30,7 +30,7 @@
<div>
Endpoint:
- <input id="endpoint" type="text" value="/jboss-seam-bay-jboss-seam-bay/AuctionService" style="width:400px"/>
+ <input id="endpoint" type="text" value="/auction/AuctionService" style="width:400px"/>
</div>
<div>
16 years
Seam SVN: r12494 - branches/community/Seam_2_2/examples/seambay/resources/META-INF.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-04-14 09:36:34 -0400 (Wed, 14 Apr 2010)
New Revision: 12494
Added:
branches/community/Seam_2_2/examples/seambay/resources/META-INF/jboss.xml
Log:
JBSEAM-4601 - added jboss.xml for web services
Added: branches/community/Seam_2_2/examples/seambay/resources/META-INF/jboss.xml
===================================================================
--- branches/community/Seam_2_2/examples/seambay/resources/META-INF/jboss.xml (rev 0)
+++ branches/community/Seam_2_2/examples/seambay/resources/META-INF/jboss.xml 2010-04-14 13:36:34 UTC (rev 12494)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss>
+ <webservices>
+ <context-root>auction</context-root>
+ </webservices>
+</jboss>
\ No newline at end of file
16 years
Seam SVN: r12493 - in modules/faces/trunk/impl/src/main: resources/META-INF/services and 1 other directory.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2010-04-14 08:50:21 -0400 (Wed, 14 Apr 2010)
New Revision: 12493
Added:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java
modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
Log:
Last attempt singletonish approach when others fail. Yes, I'm ashamed.
Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java 2010-04-14 12:21:26 UTC (rev 12492)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java 2010-04-14 12:50:21 UTC (rev 12493)
@@ -45,6 +45,7 @@
beanManagerProviders.add(ServletContextBeanManagerProvider.DEFAULT);
beanManagerProviders.add(JndiBeanManagerProvider.DEFAULT);
beanManagerProviders.add(JndiBeanManagerProvider.JBOSS_HACK);
+ beanManagerProviders.add(SingletonBeanManagerProvider.DEFAULT);
}
protected BeanManager getBeanManager()
Added: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java (rev 0)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java 2010-04-14 12:50:21 UTC (rev 12493)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.faces.cdi;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.Extension;
+
+/**
+ * Singleton(ish) extension that observes the AfterBeanDiscovery event and stores the BeanManager for access
+ * in places where injection is not available and JNDI or ServletContext access is not preferable.
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+public class BeanManagerPickupExtension implements Extension
+{
+ private static BeanManagerPickupExtension instance;
+ private volatile BeanManager beanManager;
+
+ public BeanManager getBeanManager()
+ {
+ return beanManager;
+ }
+
+ public static BeanManagerPickupExtension getInstance()
+ {
+ return instance;
+ }
+
+ public void pickupBeanManager(@Observes AfterBeanDiscovery e, BeanManager beanManager)
+ {
+ this.beanManager = beanManager;
+ BeanManagerPickupExtension.instance = this;
+ }
+}
Added: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java (rev 0)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java 2010-04-14 12:50:21 UTC (rev 12493)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.faces.cdi;
+
+import javax.enterprise.inject.spi.BeanManager;
+
+/**
+ * A BeanManager provider for an extension provided singleton
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+public class SingletonBeanManagerProvider implements BeanManagerProvider
+{
+
+ public static final BeanManagerProvider DEFAULT = new SingletonBeanManagerProvider();
+
+ @Override
+ public BeanManager getBeanManager()
+ {
+ return BeanManagerPickupExtension.getInstance().getBeanManager();
+ }
+
+}
Modified: modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
===================================================================
--- modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2010-04-14 12:21:26 UTC (rev 12492)
+++ modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2010-04-14 12:50:21 UTC (rev 12493)
@@ -1,3 +1,4 @@
org.jboss.seam.faces.context.ViewScopedExtension
org.jboss.seam.faces.context.FlashScopedExtension
-org.jboss.seam.faces.context.FacesAnnotationsAdapterExtension
\ No newline at end of file
+org.jboss.seam.faces.context.FacesAnnotationsAdapterExtension
+org.jboss.seam.faces.cdi.BeanManagerPickupExtension
16 years
Seam SVN: r12492 - in modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces: event and 1 other directory.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2010-04-14 08:21:26 -0400 (Wed, 14 Apr 2010)
New Revision: 12492
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/ServletContextBeanManagerProvider.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/DelegatingSystemEventListener.java
Log:
bad cast + opt out if no BeanManager
Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/ServletContextBeanManagerProvider.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/ServletContextBeanManagerProvider.java 2010-04-14 10:27:46 UTC (rev 12491)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/ServletContextBeanManagerProvider.java 2010-04-14 12:21:26 UTC (rev 12492)
@@ -38,7 +38,7 @@
@Override
public BeanManager getBeanManager()
{
- ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext();
+ ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
return (BeanManager) servletContext.getAttribute(BeanManager.class.getName());
}
Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/DelegatingSystemEventListener.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/DelegatingSystemEventListener.java 2010-04-14 10:27:46 UTC (rev 12491)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/DelegatingSystemEventListener.java 2010-04-14 12:21:26 UTC (rev 12492)
@@ -62,8 +62,12 @@
@SuppressWarnings("unchecked")
private List<SystemEventListener> getEventListeners()
{
+ List<SystemEventListener> result = new ArrayList<SystemEventListener>();
BeanManager manager = getBeanManager();
- List<SystemEventListener> result = new ArrayList<SystemEventListener>();
+ if (manager == null)
+ {
+ return result;
+ }
Bean<SystemEventBridge> bean = (Bean<SystemEventBridge>) manager.getBeans(SystemEventBridge.class).iterator().next();
CreationalContext<SystemEventBridge> context = manager.createCreationalContext(bean);
16 years
Seam SVN: r12491 - in modules/xml/trunk/impl/src: main/java/org/jboss/seam/xml/annotations and 6 other directories.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-04-14 06:27:46 -0400 (Wed, 14 Apr 2010)
New Revision: 12491
Added:
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/internal/
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/internal/ApplyQualifiers.java
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/BeanResultType.java
Modified:
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/BeanResult.java
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/GenericBeanResult.java
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/parser/namespace/RootNamespaceElementResolver.java
modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml
Log:
added xml configured generic beans
Added: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/internal/ApplyQualifiers.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/internal/ApplyQualifiers.java (rev 0)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/internal/ApplyQualifiers.java 2010-04-14 10:27:46 UTC (rev 12491)
@@ -0,0 +1,14 @@
+package org.jboss.seam.xml.annotations.internal;
+
+/**
+ * marker annotation that is only applied through XML
+ *
+ * It is replaced with qualifiers read from a generic bean type
+ *
+ * @author stuart
+ *
+ */
+public @interface ApplyQualifiers
+{
+
+}
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-04-14 10:14:00 UTC (rev 12490)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-04-14 10:27:46 UTC (rev 12491)
@@ -6,8 +6,6 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
@@ -19,9 +17,11 @@
import java.util.Map.Entry;
import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.AnnotatedConstructor;
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.AnnotatedParameter;
import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.BeforeBeanDiscovery;
@@ -29,8 +29,8 @@
import javax.enterprise.inject.spi.ProcessAnnotatedType;
import javax.enterprise.inject.spi.ProcessInjectionTarget;
import javax.enterprise.util.AnnotationLiteral;
-import javax.inject.Inject;
+import org.jboss.seam.xml.annotations.internal.ApplyQualifiers;
import org.jboss.seam.xml.core.BeanResult;
import org.jboss.seam.xml.core.GenericBeanResult;
import org.jboss.seam.xml.core.XmlConfiguredBean;
@@ -43,7 +43,6 @@
import org.jboss.seam.xml.parser.SaxNode;
import org.jboss.seam.xml.util.FileDataReader;
import org.jboss.weld.extensions.util.AnnotationInstanceProvider;
-import org.jboss.weld.extensions.util.ReflectionUtils;
import org.jboss.weld.extensions.util.annotated.NewAnnotatedTypeBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -276,6 +275,13 @@
return ret;
}
+ /**
+ * installs a set of secondary beans for a given generic bean, the secondary
+ * beans have the same qualifiers added to them as the generic bean, in
+ * addition the generic beans qualifiers are added whereever the
+ * ApplyQualiers annotation is found
+ *
+ */
public List<AnnotatedType<?>> processGenericBeans(BeanResult<?> bean, GenericBeanResult genericBeans, BeanManager beanManager)
{
List<AnnotatedType<?>> ret = new ArrayList<AnnotatedType<?>>();
@@ -283,10 +289,6 @@
// ret.add(rootType);
Set<Annotation> qualifiers = new HashSet<Annotation>();
- Set<Class> allBeans = new HashSet<Class>();
- allBeans.add(genericBeans.getGenericBean());
- allBeans.addAll(genericBeans.getSecondaryBeans());
-
for (Annotation i : rootType.getAnnotations())
{
if (beanManager.isQualifier(i.annotationType()))
@@ -294,110 +296,70 @@
qualifiers.add(i);
}
}
-
- for (Class<?> c : genericBeans.getSecondaryBeans())
+ for (BeanResult<?> c : genericBeans.getSecondaryBeans())
{
- NewAnnotatedTypeBuilder<?> gb = new NewAnnotatedTypeBuilder(c, true);
- for (Annotation a : qualifiers)
+
+ AnnotatedType<?> type = c.getBuilder().create();
+ NewAnnotatedTypeBuilder<?> gb = new NewAnnotatedTypeBuilder(type);
+ // we always apply qualifiers to the actual type
+ for (Annotation q : qualifiers)
{
- gb.addToClass(a);
+ gb.addToClass(q);
}
- for (Field f : ReflectionUtils.getFields(c))
+ for (AnnotatedField<?> f : type.getFields())
{
-
- if (allBeans.contains(f.getType()))
+ if (f.isAnnotationPresent(ApplyQualifiers.class))
{
- if (f.isAnnotationPresent(Produces.class) || f.isAnnotationPresent(Inject.class))
+ for (Annotation q : qualifiers)
{
- for (Annotation a : qualifiers)
- {
- gb.addToField(f, a);
- }
+ gb.addToField(f.getJavaMember(), q);
}
}
}
- // now deal with the methods
- for (Method m : ReflectionUtils.getMethods(c))
+ for (AnnotatedMethod<?> m : type.getMethods())
{
- // if this method is eligable for injection we need to check the
- // parameters
- boolean inject = false;
- if (m.isAnnotationPresent(Produces.class))
+ if (m.isAnnotationPresent(ApplyQualifiers.class))
{
- inject = true;
- // if it is a producer add qualifiers
- if (allBeans.contains(m.getReturnType()))
+ for (Annotation q : qualifiers)
{
- for (Annotation a : qualifiers)
- {
- gb.addToMethod(m, a);
- }
+ gb.addToMethod(m.getJavaMember(), q);
}
}
- // even if it is not a producer it may be a disposer or an observer
- if (!inject)
+
+ for (AnnotatedParameter<?> p : m.getParameters())
{
- for (int i = 0; i < m.getParameterTypes().length; ++i)
+ if (p.isAnnotationPresent(ApplyQualifiers.class))
{
- Annotation[] an = m.getParameterAnnotations()[i];
- for (Annotation a : an)
+ for (Annotation q : qualifiers)
{
- if (a.annotationType() == Disposes.class || a.annotationType() == Observes.class)
- {
- inject = true;
- break;
- }
+ gb.addToMethodParameter(m.getJavaMember(), p.getPosition(), q);
}
- if (inject)
- {
- break;
- }
}
}
- // if we need to apply qualifiers to the parameters
- if (inject)
+ }
+
+ for (AnnotatedConstructor<?> con : type.getConstructors())
+ {
+ if (con.isAnnotationPresent(ApplyQualifiers.class))
{
- for (int i = 0; i < m.getParameterTypes().length; ++i)
+ for (Annotation q : qualifiers)
{
- Class<?> type = m.getParameterTypes()[i];
- if (allBeans.contains(type))
- {
- for (Annotation a : qualifiers)
- {
- gb.addToMethodParameter(m, i, a);
- }
- }
+ gb.addToConstructor((Constructor) con.getJavaMember(), q);
}
}
- }
- // now deal with constructors
- for (Constructor<?> con : c.getDeclaredConstructors())
- {
- // if this constructor is eligible for injection we need to check
- // the
- // parameters
- boolean inject = false;
- if (con.isAnnotationPresent(Inject.class))
- {
- inject = true;
- }
- // if we need to apply qualifiers to the parameters
- if (inject)
+ for (AnnotatedParameter<?> p : con.getParameters())
{
- for (int i = 0; i < con.getParameterTypes().length; ++i)
+ if (p.isAnnotationPresent(ApplyQualifiers.class))
{
- Class<?> type = con.getParameterTypes()[i];
- if (allBeans.contains(type))
+ for (Annotation q : qualifiers)
{
- for (Annotation a : qualifiers)
- {
- gb.addToConstructorParameter((Constructor) con, i, a);
- }
+ gb.addToConstructorParameter((Constructor) con.getJavaMember(), p.getPosition(), q);
}
}
}
}
+
ret.add(gb.create());
}
return ret;
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/BeanResult.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/BeanResult.java 2010-04-14 10:14:00 UTC (rev 12490)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/BeanResult.java 2010-04-14 10:27:46 UTC (rev 12491)
@@ -10,7 +10,7 @@
{
NewAnnotatedTypeBuilder<X> builder;
Class<X> type;
- boolean override, extend;
+ BeanResultType beanType = BeanResultType.ADD;
public BeanResult(Class<X> type, boolean readAnnotations)
{
@@ -28,23 +28,14 @@
return type;
}
- public boolean isOverride()
+ public BeanResultType getBeanType()
{
- return override;
+ return beanType;
}
- public void setOverride(boolean override)
+ public void setBeanType(BeanResultType beanType)
{
- this.override = override;
+ this.beanType = beanType;
}
- public boolean isExtend()
- {
- return extend;
- }
-
- public void setExtend(boolean extend)
- {
- this.extend = extend;
- }
}
Added: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/BeanResultType.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/BeanResultType.java (rev 0)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/BeanResultType.java 2010-04-14 10:27:46 UTC (rev 12491)
@@ -0,0 +1,6 @@
+package org.jboss.seam.xml.core;
+
+public enum BeanResultType
+{
+ ADD, OVERRIDE, SPECIALISE;
+}
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/GenericBeanResult.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/GenericBeanResult.java 2010-04-14 10:14:00 UTC (rev 12490)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/core/GenericBeanResult.java 2010-04-14 10:27:46 UTC (rev 12491)
@@ -7,12 +7,12 @@
{
final Class genericBean;
- final Set<Class> secondaryBeans;
+ final Set<BeanResult<?>> secondaryBeans;
- public GenericBeanResult(Class<?> genericBean, Set<Class> secondaryBeans)
+ public GenericBeanResult(Class<?> genericBean, Set<BeanResult<?>> secondaryBeans)
{
this.genericBean = genericBean;
- this.secondaryBeans = new HashSet<Class>(secondaryBeans);
+ this.secondaryBeans = new HashSet<BeanResult<?>>(secondaryBeans);
}
public Class getGenericBean()
@@ -20,7 +20,7 @@
return genericBean;
}
- public Set<Class> getSecondaryBeans()
+ public Set<BeanResult<?>> getSecondaryBeans()
{
return secondaryBeans;
}
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java 2010-04-14 10:14:00 UTC (rev 12490)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java 2010-04-14 10:27:46 UTC (rev 12491)
@@ -22,6 +22,7 @@
import javax.interceptor.InterceptorBinding;
import org.jboss.seam.xml.core.BeanResult;
+import org.jboss.seam.xml.core.BeanResultType;
import org.jboss.seam.xml.core.GenericBeanResult;
import org.jboss.seam.xml.core.XmlResult;
import org.jboss.seam.xml.fieldset.FieldValueObject;
@@ -115,7 +116,7 @@
{
ret.addBean(tp);
}
- if (tp.isOverride() || tp.isExtend())
+ if (tp.getBeanType() != BeanResultType.ADD)
{
ret.addVeto(tp.getType());
}
@@ -171,10 +172,15 @@
else if (rb.getType() == XmlItemType.GENERIC_BEAN)
{
GenericBeanXmlItem item = (GenericBeanXmlItem) rb;
- Set<Class> classes = new HashSet<Class>();
+ Set<BeanResult<?>> classes = new HashSet<BeanResult<?>>();
for (ClassXmlItem c : rb.getChildrenOfType(ClassXmlItem.class))
{
- classes.add(c.getJavaClass());
+ BeanResult<?> br = buildAnnotatedType(c);
+ if (br.getBeanType() != BeanResultType.ADD)
+ {
+ ret.addVeto(br.getType());
+ }
+ classes.add(br);
}
ret.addGenericBean(new GenericBeanResult(item.getJavaClass(), classes));
}
@@ -284,8 +290,14 @@
{
throw new XmlConfigurationException("A bean may not both <override> and <extend> an existing bean", rb.getDocument(), rb.getLineno());
}
- result.setOverride(override);
- result.setExtend(extend);
+ if (override)
+ {
+ result.setBeanType(BeanResultType.OVERRIDE);
+ }
+ else if (extend)
+ {
+ result.setBeanType(BeanResultType.SPECIALISE);
+ }
for (AnnotationXmlItem item : rb.getChildrenOfType(AnnotationXmlItem.class))
{
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/parser/namespace/RootNamespaceElementResolver.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/parser/namespace/RootNamespaceElementResolver.java 2010-04-14 10:14:00 UTC (rev 12490)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/parser/namespace/RootNamespaceElementResolver.java 2010-04-14 10:27:46 UTC (rev 12491)
@@ -23,7 +23,7 @@
{
CompositeNamespaceElementResolver delegate;
- static final String[] namspaces = { "java.lang", "java.util", "javax.annotation", "javax.inject", "javax.enterprise.inject", "javax.enterprise.context", "javax.enterprise.event", "javax.decorator", "javax.interceptor" };
+ static final String[] namspaces = { "java.lang", "java.util", "javax.annotation", "javax.inject", "javax.enterprise.inject", "javax.enterprise.context", "javax.enterprise.event", "javax.decorator", "javax.interceptor", "org.jboss.seam.xml.annotations.internal" };
public RootNamespaceElementResolver()
{
Modified: modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml
===================================================================
--- modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml 2010-04-14 10:14:00 UTC (rev 12490)
+++ modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml 2010-04-14 10:27:46 UTC (rev 12491)
@@ -3,7 +3,13 @@
xmlns:test="urn:java:org.jboss.seam.xml.test.generic">
<genericBean class="org.jboss.seam.xml.test.generic.GenericMain" >
- <test:GenericDependant/>
+ <test:GenericDependant>
+ <ApplyQualifiers/>
+ <specializes/>
+ <test:instance>
+ <ApplyQualifiers/>
+ </test:instance>
+ </test:GenericDependant>
</genericBean>
<test:GenericMain>
16 years