[JBoss JIRA] (DROOLS-365) Rule attribute for adding inverse of consequence as rule condition
by Davide Sottara (JIRA)
[ https://issues.jboss.org/browse/DROOLS-365?page=com.atlassian.jira.plugin... ]
Davide Sottara commented on DROOLS-365:
---------------------------------------
I see what you are trying to do, but I am not sure that such an attribute would be feasible, or even solve your problem.
What happens if a rule inserts (and modifies, and retracts...) more than one object? And what happens if the same object
is insert by more than one rule?
Have you tried using the EQUALITY assertion behavior and/or the @propertyReactive annotation? The former considers
equivalent (i.e. equals()) object to be the "same" and thus do not activate rules multiple times, regardless of the rule
that generated the objects. The latter allows you to control how rules fire in case of updates.
Best
Davide
> Rule attribute for adding inverse of consequence as rule condition
> ------------------------------------------------------------------
>
> Key: DROOLS-365
> URL: https://issues.jboss.org/browse/DROOLS-365
> Project: Drools
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Reporter: Adar Dembo
> Assignee: Mark Proctor
>
> I have quite a few rules that look like this:
> {noformat}
> rule "if foo then bar"
> when
> Foo($a : a, $b : b)
> not Bar(a == $a, b == $b)
> then
> insert(new Bar($a, $b));
> end
> {noformat}
> This is a fairly common pattern for me: a rule should not activate if the facts generated by its consequence were already asserted. It's a pattern I use extensively to generate linear (i.e. non-repeating) workflows.
> Ideally I'd be able to express it as follows:
> {noformat}
> rule "if foo then bar"
> condition-on-inverse-of-consequence
> when
> Foo($a : a, $b : b)
> then
> insert(new Bar($a, $b));
> end
> {noformat}
> And {{condition-on-inverse-of-consequence}} would cause Drools to generate the right kind of condition, which would be the inverse of the fact changes made by the consequence.
> I think {{lock-on-active}} is similar but harsher: it prevents the rule from firing a second time altogether, regardless of input. At least, that's based on my reading of the docs. In my example, that would be equivalent to {{not Bar()}} condition in the rule, which is stricter than {{not Bar(a == $a, b == $b)}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (DROOLS-366) ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-366?page=com.atlassian.jira.plugin... ]
Mario Fusco commented on DROOLS-366:
------------------------------------
You wrote "Import attached maven project", but I don't see any attachment. Could you please attach your reproducer?
> ArrayIndexOutOfBoundsException when loading drools spring on tomcat eclipse
> ---------------------------------------------------------------------------
>
> Key: DROOLS-366
> URL: https://issues.jboss.org/browse/DROOLS-366
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: Windows 7
> Reporter: prabuddha roy
> Assignee: Mario Fusco
> Fix For: 5.5.1.Final, 6.0.0.CR1
>
>
> Have a decision table rule which works fine with test cases under Drools-spring 5.4.0.Final or 5.5 as well.
> However while deploying the code on a Tomcat Eclipse its fails to initialize the kbase bean
> with the following stack trace.
> {code}
> java.lang.ArrayIndexOutOfBoundsException: -1
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
> at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
> at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
> at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
> at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
> at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
> at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
> at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
> at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
> at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
> at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
> at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
> at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
> at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
> at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
> at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
> at org.apache.catalina.core.StandardService.start(StandardService.java:525)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Dec 5, 2013 7:34:46 PM org.apache.catalina.core.StandardContext listenerStart
> SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kbase': Invocation of init method failed; nested exception is java.lang.
> ArrayIndexOutOfBoundsException: -1
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
> at org.apache.catalina.core.StandardService.start(StandardService.java:525)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeTypeParameters(Parser.java:7823)
> at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6431)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9339)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9571)
> at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9528)
> at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8126)
> at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:712)
> at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:377)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:422)
> at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
> at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
> at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:410)
> at org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
> at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:103)
> at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1194)
> at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:947)
> at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:936)
> at org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:449)
> at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:713)
> at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
> at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:113)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
> ... 27 more
> {code}
> Bean config xml -
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:drools-spring="http://drools.org/schema/drools-spring"
> xsi:schemaLocation="http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd
> http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
> <drools-spring:kbase id="kbase">
> <drools-spring:resources>
> <drools-spring:resource type="DTABLE" source="classpath:DummyRules.xls" >
> <drools-spring:decisiontable-conf input-type="XLS" worksheet-name="Tables"/>
> </drools-spring:resource>
> </drools-spring:resources>
> </drools-spring:kbase>
> <drools-spring:ksession id="ksession" type="stateless" kbase="kbase" />
> <bean id="connectPrivacyRule" class="foo.RulesEngine">
> <property name="ksession" ref="ksession" />
> <property name="kbase" ref="kbase" />
> </bean>
> </beans>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-2611) Support CDI injection in various JSF artifacts
by Tomas Remes (JIRA)
[ https://issues.jboss.org/browse/WFLY-2611?page=com.atlassian.jira.plugin.... ]
Tomas Remes updated WFLY-2611:
------------------------------
Description:
If I understand correctly to the subchapter "5.4.1
JSF Managed Classes and Java EE Annotations" of JSF 2.2 specification, there should be opportunity to use a lot of (and not only) CDI annotations in various JSF artifacts (ActionListener, SystemEventListener, etc. - for full list, please see the spec).
So far I tried locally this (will be filling the table during time):
||JSF artifact||CDI Injection||
|javax.el.ELResolver||
|javax.faces.application.ApplicationFactory||
|javax.faces.application.NavigationHandler||
|javax.faces.application.ResourceHandler||
|javax.faces.application.StateManager|works (however there is question about availability of injected instances in constructor of this custom delegating object|
|javax.faces.component.visit.VisitContextFactory|works|
|javax.faces.context.ExceptionHandlerFactory|works|
|javax.faces.context.ExternalContextFactory|||
|javax.faces.context.FacesContextFactory|works|
|javax.faces.context.PartialViewContextFactory||
|javax.faces.event.ActionListener|works only when specified also in faces-config|
|javax.faces.event.SystemEventListener|doesn't work|
|javax.faces.lifecycle.ClientWindowFactory||
|javax.faces.lifecycle.LifecycleFactory||
|javax.faces.lifecycle.PhaseListener|works|
|javax.faces.render.RenderKitFactory||
|javax.faces.view.ViewDeclarationFactory||
|javax.faces.view.facelets.FaceletCacheFactory||
|javax.faces.view.facelets.FaceletFactory||
|javax.faces.view.facelets.TagHandlerDelegateFactory||
was:
If I understand correctly to the subchapter "5.4.1
JSF Managed Classes and Java EE Annotations" of JSF 2.2 specification, there should be opportunity to use a lot of (and not only) CDI annotations in various JSF artifacts (ActionListener, SystemEventListener, etc. - for full list, please see the spec).
So far I tried locally this (will be filling the table during time):
||JSF artifact||CDI Injection||
|javax.el.ELResolver||
|javax.faces.application.ApplicationFactory||
|javax.faces.application.NavigationHandler||
|javax.faces.application.ResourceHandler||
|javax.faces.application.StateManager|works (however there is question about availability of injected instances in constructor of this custom delegating object|
|javax.faces.component.visit.VisitContextFactory|||
|javax.faces.context.ExceptionHandlerFactory|works|
|javax.faces.context.ExternalContextFactory|||
|javax.faces.context.FacesContextFactory|works|
|javax.faces.context.PartialViewContextFactory||
|javax.faces.event.ActionListener|works only when specified also in faces-config|
|javax.faces.event.SystemEventListener|doesn't work|
|javax.faces.lifecycle.ClientWindowFactory||
|javax.faces.lifecycle.LifecycleFactory||
|javax.faces.lifecycle.PhaseListener|works|
|javax.faces.render.RenderKitFactory||
|javax.faces.view.ViewDeclarationFactory||
|javax.faces.view.facelets.FaceletCacheFactory||
|javax.faces.view.facelets.FaceletFactory||
|javax.faces.view.facelets.TagHandlerDelegateFactory||
> Support CDI injection in various JSF artifacts
> ----------------------------------------------
>
> Key: WFLY-2611
> URL: https://issues.jboss.org/browse/WFLY-2611
> Project: WildFly
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: CDI / Weld
> Reporter: Tomas Remes
> Assignee: Stuart Douglas
>
> If I understand correctly to the subchapter "5.4.1
> JSF Managed Classes and Java EE Annotations" of JSF 2.2 specification, there should be opportunity to use a lot of (and not only) CDI annotations in various JSF artifacts (ActionListener, SystemEventListener, etc. - for full list, please see the spec).
> So far I tried locally this (will be filling the table during time):
> ||JSF artifact||CDI Injection||
> |javax.el.ELResolver||
> |javax.faces.application.ApplicationFactory||
> |javax.faces.application.NavigationHandler||
> |javax.faces.application.ResourceHandler||
> |javax.faces.application.StateManager|works (however there is question about availability of injected instances in constructor of this custom delegating object|
> |javax.faces.component.visit.VisitContextFactory|works|
> |javax.faces.context.ExceptionHandlerFactory|works|
> |javax.faces.context.ExternalContextFactory|||
> |javax.faces.context.FacesContextFactory|works|
> |javax.faces.context.PartialViewContextFactory||
> |javax.faces.event.ActionListener|works only when specified also in faces-config|
> |javax.faces.event.SystemEventListener|doesn't work|
> |javax.faces.lifecycle.ClientWindowFactory||
> |javax.faces.lifecycle.LifecycleFactory||
> |javax.faces.lifecycle.PhaseListener|works|
> |javax.faces.render.RenderKitFactory||
> |javax.faces.view.ViewDeclarationFactory||
> |javax.faces.view.facelets.FaceletCacheFactory||
> |javax.faces.view.facelets.FaceletFactory||
> |javax.faces.view.facelets.TagHandlerDelegateFactory||
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-2611) Support CDI injection in various JSF artifacts
by Tomas Remes (JIRA)
[ https://issues.jboss.org/browse/WFLY-2611?page=com.atlassian.jira.plugin.... ]
Tomas Remes updated WFLY-2611:
------------------------------
Description:
If I understand correctly to the subchapter "5.4.1
JSF Managed Classes and Java EE Annotations" of JSF 2.2 specification, there should be opportunity to use a lot of (and not only) CDI annotations in various JSF artifacts (ActionListener, SystemEventListener, etc. - for full list, please see the spec).
So far I tried locally this (will be filling the table during time):
||JSF artifact||CDI Injection||
|javax.el.ELResolver||
|javax.faces.application.ApplicationFactory||
|javax.faces.application.NavigationHandler||
|javax.faces.application.ResourceHandler||
|javax.faces.application.StateManager|works (however there is question about availability of injected instances in constructor of this custom delegating object|
|javax.faces.component.visit.VisitContextFactory|||
|javax.faces.context.ExceptionHandlerFactory|works|
|javax.faces.context.ExternalContextFactory|||
|javax.faces.context.FacesContextFactory|works|
|javax.faces.context.PartialViewContextFactory||
|javax.faces.event.ActionListener|works only when specified also in faces-config|
|javax.faces.event.SystemEventListener|doesn't work|
|javax.faces.lifecycle.ClientWindowFactory||
|javax.faces.lifecycle.LifecycleFactory||
|javax.faces.lifecycle.PhaseListener|works|
|javax.faces.render.RenderKitFactory||
|javax.faces.view.ViewDeclarationFactory||
|javax.faces.view.facelets.FaceletCacheFactory||
|javax.faces.view.facelets.FaceletFactory||
|javax.faces.view.facelets.TagHandlerDelegateFactory||
was:
If I understand correctly to the subchapter "5.4.1
JSF Managed Classes and Java EE Annotations" of JSF 2.2 specification, there should be opportunity to use a lot of (and not only) CDI annotations in various JSF artifacts (ActionListener, SystemEventListener, etc. - for full list, please see the spec).
So far I tried locally this (will be filling the table during time):
||JSF artifact||CDI Injection||
|javax.el.ELResolver||
|javax.faces.application.ApplicationFactory||
|javax.faces.application.NavigationHandler||
|javax.faces.application.ResourceHandler||
|javax.faces.application.StateManager|works (however there is question about availability of injected instances in constructor of this custom delegating object|
|javax.faces.component.visit.VisitContextFactory|||
|javax.faces.context.ExceptionHandlerFactory|||
|javax.faces.context.ExternalContextFactory|||
|javax.faces.context.FacesContextFactory|works|
|javax.faces.context.PartialViewContextFactory||
|javax.faces.event.ActionListener|works only when specified also in faces-config|
|javax.faces.event.SystemEventListener|doesn't work|
|javax.faces.lifecycle.ClientWindowFactory||
|javax.faces.lifecycle.LifecycleFactory||
|javax.faces.lifecycle.PhaseListener|works|
|javax.faces.render.RenderKitFactory||
|javax.faces.view.ViewDeclarationFactory||
|javax.faces.view.facelets.FaceletCacheFactory||
|javax.faces.view.facelets.FaceletFactory||
|javax.faces.view.facelets.TagHandlerDelegateFactory||
> Support CDI injection in various JSF artifacts
> ----------------------------------------------
>
> Key: WFLY-2611
> URL: https://issues.jboss.org/browse/WFLY-2611
> Project: WildFly
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: CDI / Weld
> Reporter: Tomas Remes
> Assignee: Stuart Douglas
>
> If I understand correctly to the subchapter "5.4.1
> JSF Managed Classes and Java EE Annotations" of JSF 2.2 specification, there should be opportunity to use a lot of (and not only) CDI annotations in various JSF artifacts (ActionListener, SystemEventListener, etc. - for full list, please see the spec).
> So far I tried locally this (will be filling the table during time):
> ||JSF artifact||CDI Injection||
> |javax.el.ELResolver||
> |javax.faces.application.ApplicationFactory||
> |javax.faces.application.NavigationHandler||
> |javax.faces.application.ResourceHandler||
> |javax.faces.application.StateManager|works (however there is question about availability of injected instances in constructor of this custom delegating object|
> |javax.faces.component.visit.VisitContextFactory|||
> |javax.faces.context.ExceptionHandlerFactory|works|
> |javax.faces.context.ExternalContextFactory|||
> |javax.faces.context.FacesContextFactory|works|
> |javax.faces.context.PartialViewContextFactory||
> |javax.faces.event.ActionListener|works only when specified also in faces-config|
> |javax.faces.event.SystemEventListener|doesn't work|
> |javax.faces.lifecycle.ClientWindowFactory||
> |javax.faces.lifecycle.LifecycleFactory||
> |javax.faces.lifecycle.PhaseListener|works|
> |javax.faces.render.RenderKitFactory||
> |javax.faces.view.ViewDeclarationFactory||
> |javax.faces.view.facelets.FaceletCacheFactory||
> |javax.faces.view.facelets.FaceletFactory||
> |javax.faces.view.facelets.TagHandlerDelegateFactory||
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (JBFORUMS-302) on Linux Environment it is Creating File Descriptors which increases continually
by vijay saini (JIRA)
[ https://issues.jboss.org/browse/JBFORUMS-302?page=com.atlassian.jira.plug... ]
vijay saini updated JBFORUMS-302:
---------------------------------
Summary: on Linux Environment it is Creating File Descriptors which increases continually (was: We are making mbean Server connection with Jboss 7 Using Below Code. )
Labels: jboss (was: )
Environment:
Jboss - Community 7.2,
OS – LINUX 64bit
Description:
We are making mbean Server connection with Jboss 7 Using Below Code.
JMXConnector jmxConnector = JMXConnectorFactory.connect(serviceURL, environment);
msc = jmxConnector.getMBeanServerConnection();
If I am running this code on Linux Environment it is Creating File Descriptors which increases continually. (We are making Connection with Many servers in Loop).
Due to which over the time period the max limit of FD reaches for Process and it stops creating New Connections.
We tried to closing the jmxConnector after msc.queryNames(null, null), But it didn’t solved our Issue.
Anyone else faced this issue and have any Resolution?
Environment Details
Jboss - Community 7.2
OS – LINUX 64bit
> on Linux Environment it is Creating File Descriptors which increases continually
> --------------------------------------------------------------------------------
>
> Key: JBFORUMS-302
> URL: https://issues.jboss.org/browse/JBFORUMS-302
> Project: JBoss Forums
> Issue Type: Bug
> Environment: Jboss - Community 7.2,
> OS – LINUX 64bit
> Reporter: vijay saini
> Assignee: Luca Stancapiano
> Labels: jboss
>
> We are making mbean Server connection with Jboss 7 Using Below Code.
> JMXConnector jmxConnector = JMXConnectorFactory.connect(serviceURL, environment);
> msc = jmxConnector.getMBeanServerConnection();
> If I am running this code on Linux Environment it is Creating File Descriptors which increases continually. (We are making Connection with Many servers in Loop).
> Due to which over the time period the max limit of FD reaches for Process and it stops creating New Connections.
> We tried to closing the jmxConnector after msc.queryNames(null, null), But it didn’t solved our Issue.
> Anyone else faced this issue and have any Resolution?
> Environment Details
> Jboss - Community 7.2
> OS – LINUX 64bit
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-2527) It's not possible to query subresources of the Infinispan subsystem
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-2527?page=com.atlassian.jira.plugin.... ]
Brian Stansberry updated WFLY-2527:
-----------------------------------
Comment: was deleted
(was: Hmm; ignore the last comment for now; I may be totally off base.)
> It's not possible to query subresources of the Infinispan subsystem
> --------------------------------------------------------------------
>
> Key: WFLY-2527
> URL: https://issues.jboss.org/browse/WFLY-2527
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Domain Management
> Reporter: Heiko Braun
> Assignee: Brian Stansberry
> Fix For: 8.0.0.CR1
>
>
> the infinispan cache description are not provided for wildcards. Hence it's not possible to query rrd() _before_ adding a resource:
> {code}
> [domain@localhost:9990 /] /profile=default/subsystem=infinispan/cache-container=web/local-cache=local-web/eviction=*:read-resource-description()
> {
> "outcome" => "failed",
> "failure-description" => "JBAS014883: No resource definition is registered for address [
> (\"profile\" => \"default\"),
> (\"subsystem\" => \"infinispan\"),
> (\"cache-container\" => \"web\"),
> (\"local-cache\" => \"local-web\"),
> (\"eviction\" => \"*\")
> ]",
> "rolled-back" => true
> }
> {code}
> Same for the other cache subresources. Please add the wildcard handlers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-2527) It's not possible to query subresources of the Infinispan subsystem
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-2527?page=com.atlassian.jira.plugin.... ]
Brian Stansberry edited comment on WFLY-2527 at 12/5/13 10:49 PM:
------------------------------------------------------------------
A resource registration for eviction=* is not valid, because that means that resources of that type with any address value are valid, which isn't true.
However, we do support wildcard queries a la what we do with :read-resource for :read-resource-description as well. But there are problems in how we handle the wildcard queries when there is no registration that matches the queried address. There shouldn't be a requirement for a matching registration. So that's the bug to fix.
was (Author: brian.stansberry):
A resource description for eviction=* is not valid, because that means that resources of that type with any address value are valid, which isn't true.
The only thing I can think to do hear is to support wildcard queries a la what we do with :read-resource for :read-resource-description as well. That is, the style where you get back a list of matching addresses.
The problem is that's a breaking change to the behavior of r-r-d for the cases where there is a * registration.
> It's not possible to query subresources of the Infinispan subsystem
> --------------------------------------------------------------------
>
> Key: WFLY-2527
> URL: https://issues.jboss.org/browse/WFLY-2527
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Domain Management
> Reporter: Heiko Braun
> Assignee: Brian Stansberry
> Fix For: 8.0.0.CR1
>
>
> the infinispan cache description are not provided for wildcards. Hence it's not possible to query rrd() _before_ adding a resource:
> {code}
> [domain@localhost:9990 /] /profile=default/subsystem=infinispan/cache-container=web/local-cache=local-web/eviction=*:read-resource-description()
> {
> "outcome" => "failed",
> "failure-description" => "JBAS014883: No resource definition is registered for address [
> (\"profile\" => \"default\"),
> (\"subsystem\" => \"infinispan\"),
> (\"cache-container\" => \"web\"),
> (\"local-cache\" => \"local-web\"),
> (\"eviction\" => \"*\")
> ]",
> "rolled-back" => true
> }
> {code}
> Same for the other cache subresources. Please add the wildcard handlers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-2527) It's not possible to query subresources of the Infinispan subsystem
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-2527?page=com.atlassian.jira.plugin.... ]
Brian Stansberry updated WFLY-2527:
-----------------------------------
Fix Version/s: 8.0.0.CR1
> It's not possible to query subresources of the Infinispan subsystem
> --------------------------------------------------------------------
>
> Key: WFLY-2527
> URL: https://issues.jboss.org/browse/WFLY-2527
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Domain Management
> Reporter: Heiko Braun
> Assignee: Brian Stansberry
> Fix For: 8.0.0.CR1
>
>
> the infinispan cache description are not provided for wildcards. Hence it's not possible to query rrd() _before_ adding a resource:
> {code}
> [domain@localhost:9990 /] /profile=default/subsystem=infinispan/cache-container=web/local-cache=local-web/eviction=*:read-resource-description()
> {
> "outcome" => "failed",
> "failure-description" => "JBAS014883: No resource definition is registered for address [
> (\"profile\" => \"default\"),
> (\"subsystem\" => \"infinispan\"),
> (\"cache-container\" => \"web\"),
> (\"local-cache\" => \"local-web\"),
> (\"eviction\" => \"*\")
> ]",
> "rolled-back" => true
> }
> {code}
> Same for the other cache subresources. Please add the wildcard handlers.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months