[JBoss JIRA] (ELY-279) Support CORS
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/ELY-279?page=com.atlassian.jira.plugin.sy... ]
Darran Lofthouse updated ELY-279:
---------------------------------
Fix Version/s: 2.0.0.Alpha1
(was: 1.1.0.Beta8)
> Support CORS
> ------------
>
> Key: ELY-279
> URL: https://issues.jboss.org/browse/ELY-279
> Project: WildFly Elytron
> Issue Type: Feature Request
> Components: HTTP
> Reporter: Darran Lofthouse
> Assignee: Darran Lofthouse
> Fix For: 2.0.0.Alpha1
>
>
> This is something that can possibly be tied in around the HTTP authentication framework meaning that the control of this can live in the HTTP authentication policy within Elytron rather than at the front end.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (ELY-524) Caching support in the LDAP realm
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/ELY-524?page=com.atlassian.jira.plugin.sy... ]
Darran Lofthouse reassigned ELY-524:
------------------------------------
Assignee: Pedro Igor (was: Darran Lofthouse)
> Caching support in the LDAP realm
> ---------------------------------
>
> Key: ELY-524
> URL: https://issues.jboss.org/browse/ELY-524
> Project: WildFly Elytron
> Issue Type: Feature Request
> Components: Realms
> Reporter: David Lloyd
> Assignee: Pedro Igor
> Priority: Critical
> Fix For: 1.1.0.Beta8
>
>
> The LDAP realm should use a caching strategy to avoid excessive database load in the presence of per-request authentication traffic.
> The realm implementation could maintain a synchronized LRU cache of one-time-initialize references to a cached DirContext or Attributes or binding or some combination of these. Because the cache is synchronized, the one-time-initialize object would be added under the lock and then the lock released before the object is populated and returned as a cached credential, allowing atomic action with a minimum of contention.
> For each cached entity, a NamingListener could be established which would invalidate (or possibly update) the cached value as the database changes.
> Alternatively, a NamingListener could be established for all identities, and each update would invalidate or update any cached values corresponding to the DN or resolved name.
> This is a complex design topic so discussion is welcome.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (ELY-524) Caching support in the LDAP realm
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/ELY-524?page=com.atlassian.jira.plugin.sy... ]
Darran Lofthouse reassigned ELY-524:
------------------------------------
Assignee: Darran Lofthouse
> Caching support in the LDAP realm
> ---------------------------------
>
> Key: ELY-524
> URL: https://issues.jboss.org/browse/ELY-524
> Project: WildFly Elytron
> Issue Type: Feature Request
> Components: Realms
> Reporter: David Lloyd
> Assignee: Darran Lofthouse
> Priority: Critical
> Fix For: 1.1.0.Beta8
>
>
> The LDAP realm should use a caching strategy to avoid excessive database load in the presence of per-request authentication traffic.
> The realm implementation could maintain a synchronized LRU cache of one-time-initialize references to a cached DirContext or Attributes or binding or some combination of these. Because the cache is synchronized, the one-time-initialize object would be added under the lock and then the lock released before the object is populated and returned as a cached credential, allowing atomic action with a minimum of contention.
> For each cached entity, a NamingListener could be established which would invalidate (or possibly update) the cached value as the database changes.
> Alternatively, a NamingListener could be established for all identities, and each update would invalidate or update any cached values corresponding to the DN or resolved name.
> This is a complex design topic so discussion is welcome.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (DROOLS-1243) ClassCastException at runtime when trying to match "from" and a built-in accumulate function.
by Matteo Mortari (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1243?page=com.atlassian.jira.plugi... ]
Matteo Mortari commented on DROOLS-1243:
----------------------------------------
Possibly related.
> ClassCastException at runtime when trying to match "from" and a built-in accumulate function.
> ---------------------------------------------------------------------------------------------
>
> Key: DROOLS-1243
> URL: https://issues.jboss.org/browse/DROOLS-1243
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Reporter: Matteo Mortari
> Assignee: Mario Fusco
> Priority: Minor
>
> A rule like this
> {code:java}
> global java.util.List list;
> rule R when
> $theFrom : Double() from accumulate(MyPerson( $val : age );
> sum( $val ) )
> then
> list.add($theFrom);
> end
> {code}
> works fine but if modified like:
> {code:java}
> import java.math.BigDecimal;
> global java.util.List list;
> rule R when
> $theFrom : BigDecimal() from accumulate(MyPerson( $val : age );
> sum( $val ) )
> then
> list.add($theFrom);
> end
> {code}
> then it breaks at runtime, with {{ClassCastException}}.
> Suggested correct behavior:
> {quote}it should either raise a compilation error (if it is a typed function, like sum()) or just fail to match at runtime, as BigDecimal() does not match the result of sum(){quote}
> full stack trace for reference:
> {code:java}
> Exception executing consequence for rule "R" in defaultpkg: java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigDecimal
> at org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
> at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1110)
> at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:121)
> at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74)
> at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1017)
> at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1360)
> at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1298)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1353)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1344)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1325)
> at org.drools.compiler.integrationtests.AccumulateTest.testCCEAtRuntimeFromAccumulate(AccumulateTest.java:3116)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigDecimal
> at defaultpkg.Rule_R880096074DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
> at defaultpkg.Rule_R880096074DefaultConsequenceInvoker.evaluate(Unknown Source)
> at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1099)
> ... 32 more
> {code}
> Will submit test case for reproducing the error.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (DROOLS-1243) ClassCastException at runtime when trying to match "from" and a built-in accumulate function.
by Matteo Mortari (JIRA)
Matteo Mortari created DROOLS-1243:
--------------------------------------
Summary: ClassCastException at runtime when trying to match "from" and a built-in accumulate function.
Key: DROOLS-1243
URL: https://issues.jboss.org/browse/DROOLS-1243
Project: Drools
Issue Type: Bug
Components: core engine
Reporter: Matteo Mortari
Assignee: Mario Fusco
Priority: Minor
A rule like this
{code:java}
global java.util.List list;
rule R when
$theFrom : Double() from accumulate(MyPerson( $val : age );
sum( $val ) )
then
list.add($theFrom);
end
{code}
works fine but if modified like:
{code:java}
import java.math.BigDecimal;
global java.util.List list;
rule R when
$theFrom : BigDecimal() from accumulate(MyPerson( $val : age );
sum( $val ) )
then
list.add($theFrom);
end
{code}
then it breaks at runtime, with {{ClassCastException}}.
Suggested correct behavior:
{quote}it should either raise a compilation error (if it is a typed function, like sum()) or just fail to match at runtime, as BigDecimal() does not match the result of sum(){quote}
full stack trace for reference:
{code:java}
Exception executing consequence for rule "R" in defaultpkg: java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigDecimal
at org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1110)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:121)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1017)
at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1360)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1298)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1353)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1344)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1325)
at org.drools.compiler.integrationtests.AccumulateTest.testCCEAtRuntimeFromAccumulate(AccumulateTest.java:3116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigDecimal
at defaultpkg.Rule_R880096074DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at defaultpkg.Rule_R880096074DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1099)
... 32 more
{code}
Will submit test case for reproducing the error.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months