[JBoss JIRA] (WFCORE-538) Add GZIP handler for http management interface
by Harald Pehl (JIRA)
Harald Pehl created WFCORE-538:
----------------------------------
Summary: Add GZIP handler for http management interface
Key: WFCORE-538
URL: https://issues.jboss.org/browse/WFCORE-538
Project: WildFly Core
Issue Type: Enhancement
Components: Domain Management
Reporter: Harald Pehl
Assignee: Harald Pehl
The payload for management operations tends to become quite big especially if you execute (recursive) r-r-d ops. This leads to latency for the management console. This is not a major problem when the management console runs locally. But since we have support for CORS now and the console can connect to arbitrary management endpoints a more compact format would reduce latency.
Adding a GZIP handler will reduce the base64 encoded payload dramatically.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (JGRP-1905) FORK: RPCs might block if fork channel or fork stack is not available
by Paul Ferraro (JIRA)
[ https://issues.jboss.org/browse/JGRP-1905?page=com.atlassian.jira.plugin.... ]
Paul Ferraro reopened JGRP-1905:
--------------------------------
Assignee: Paul Ferraro (was: Bela Ban)
Reopening. FORK needs to expose a mechanism to allow the creator to define how unknown forks should be handled.
> FORK: RPCs might block if fork channel or fork stack is not available
> ---------------------------------------------------------------------
>
> Key: JGRP-1905
> URL: https://issues.jboss.org/browse/JGRP-1905
> Project: JGroups
> Issue Type: Bug
> Reporter: Bela Ban
> Assignee: Paul Ferraro
> Priority: Critical
> Fix For: 3.6.2
>
>
> When we have nodes A,B,C,D, but fork-stack "fs-2" is not available on B, or fork-channel "ch-3" is not available on B, then an RPC invoked by A on all cluster nodes will time out.
> h5. Solution
> * Throw an exception on B if a fork-stack or -channel is not available on a target node. This way, the RPC would return quickly and B's response would be set to the exception (e.g. "fork channel fc-2 not available").
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (WFLY-3112) One can't change history and decay with DynamicLoadBalanceFactorProvider
by Radoslav Husar (JIRA)
[ https://issues.jboss.org/browse/WFLY-3112?page=com.atlassian.jira.plugin.... ]
Radoslav Husar closed WFLY-3112.
--------------------------------
> One can't change history and decay with DynamicLoadBalanceFactorProvider
> ------------------------------------------------------------------------
>
> Key: WFLY-3112
> URL: https://issues.jboss.org/browse/WFLY-3112
> Project: WildFly
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 8.0.0.Final
> Reporter: Michal Babacek
> Assignee: Radoslav Husar
> Priority: Critical
> Fix For: 8.1.0.CR1, 8.1.0.Final
>
> Attachments: redacted_log
>
>
> I'm under an ugly impression that one can't actually change {{history}} and {{decay}} attributes of *DynamicLoadBalanceFactorProvider*.
> I was trying to figure out why the new test suite of CustomLoadMetric tests does not pass. In order to get load figures without history and decay manipulation, I set the following:
> {code}
> <subsystem xmlns="urn:jboss:domain:modcluster:1.2">
> <mod-cluster-config advertise-socket="modcluster" connector="ajp">
> <dynamic-load-provider history="0">
> <custom-load-metric class="biz.karms.modcluster.CustomLoadMetric" weight="1">
> <property name="capacity" value="1000"/>
> <property name="loadfile" value="/tmp/mod_cluster-eapx/loadfileA"/>
> <property name="parseexpression" value="^LOAD: ([0-9]*)$"/>
> </custom-load-metric>
> </dynamic-load-provider>
> </mod-cluster-config>
> </subsystem>
> {code}
> The aforementioned {{history=0}} effectively means that there is just 1 "slot" for a one historical value on which decay function should work.
> If you take a look at the code in [DynamicLoadBalanceFactorProvider|https://github.com/modcluster/mod_cluste...] constructor, it is apparent
> that the size of the List that later serves for storing the historical values is set sooner than the actual [setHistory(int history)|https://github.com/modcluster/mod_cluster/blob/master/core/src/m...] method is called.
> The actual size of that List collection wouldn't do any harm by itself but it is being used in the aforementioned class with {{.size()}} to control cycles.
> The same IMHO holds for the decay attribute.
> Anyhow, I put some additional logging to the [DynamicLoadBalanceFactorProvider.java|https://github.com/modcluster/mod_c...]:
> {code}
> // Historical value contribute an exponentially decayed factor
> for (int i = 0; i < queue.size(); ++i) {
> double decay = 1 / Math.pow(decayFactor, i);
> totalDecay += decay;
> this.log.info("KTAG: totalLoad:"+totalLoad+", with decay:"+(totalLoad+queue.get(i).doubleValue() * decay));
> totalLoad += queue.get(i).doubleValue() * decay;
> }
> {code}
> and
> {code}
> try {
> // Normalize load with respect to capacity
> this.recordLoad(metricLoadHistory, metric.getLoad(engine) / metric.getCapacity());
> this.log.info("KTAG metricLoadHistory:"+metricLoadHistory.toString());
> totalWeight += weight;
> totalWeightedLoad += this.average(metricLoadHistory) * weight;
> } catch (Exception e) {
> this.log.error(e.getLocalizedMessage(), e);
> }
> {code}
> with the following being the output: [^redacted_log].
> So, despite having {{history=0}}, which should force the system to keep just 1, the current value, {{metricLoadHistory}} grew from
> {noformat}
> KTAG metricLoadHistory:[0.8]
> {noformat}
> to
> {noformat}
> KTAG metricLoadHistory:[0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.8]
> {noformat}
> which is exactly [9|https://github.com/modcluster/mod_cluster/blob/master/core/src/main/jav...] + [1|https://github.com/modcluster/mod_cluster/blob/master/core/src/main/jav...] in size :-)
> WDYT?
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (WFCORE-353) CLI command for executing the deployment scanner
by Emmanuel Hugonnet (JIRA)
[ https://issues.jboss.org/browse/WFCORE-353?page=com.atlassian.jira.plugin... ]
Emmanuel Hugonnet commented on WFCORE-353:
------------------------------------------
This is a little more complicated than it may seem at first sight.
Since deploying update the model we would need to execute the operation in MODEL stage but then we can't rely on accessing the scanner in a reliable manner as a service is 'stable' only in RUNTIME stage.
We can't create a throw away scanner just for the operation as we could have 2 scans (manual and automatic) running at the same time.
So the scan needs to be run asynchronously but we have to define a way for rollbacks.
> CLI command for executing the deployment scanner
> ------------------------------------------------
>
> Key: WFCORE-353
> URL: https://issues.jboss.org/browse/WFCORE-353
> Project: WildFly Core
> Issue Type: Feature Request
> Components: CLI, Domain Management, Server
> Reporter: Ben Schofield
> Assignee: Emmanuel Hugonnet
> Priority: Minor
>
> provide a CLI command that will run the deployment scanner even if the deployment scanner is turned off.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (WFLY-4331) EJB Asynchronous pass POJO by reference leading to ClassCastException errors in remote invocations
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-4331?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-4331:
-----------------------------------------------
Carlo de Wolf <cdewolf(a)redhat.com> changed the Status of [bug 1188420|https://bugzilla.redhat.com/show_bug.cgi?id=1188420] from POST to ASSIGNED
> EJB Asynchronous pass POJO by reference leading to ClassCastException errors in remote invocations
> --------------------------------------------------------------------------------------------------
>
> Key: WFLY-4331
> URL: https://issues.jboss.org/browse/WFLY-4331
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 9.0.0.Alpha1
> Reporter: Brad Maxwell
> Assignee: David Lloyd
>
> When invoking EJB asynchronous in different deployments and returning a POJO object, which will be retrieved using future.get, we have ClassCastException error.
> {code}
> 12:53:50,147 ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /testejb-web/async: java.lang.ClassCastException: rh.test.ReturnObject cannot be cast to rh.test.ReturnObject
> at rh.test.AsyncServlet.doGet(AsyncServlet.java:29) [classes:]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:259) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:246) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:75) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:165) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:737) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (DROOLS-707) NullPointer when changing order of the rules
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-707?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-707:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> NullPointer when changing order of the rules
> --------------------------------------------
>
> Key: DROOLS-707
> URL: https://issues.jboss.org/browse/DROOLS-707
> Project: Drools
> Issue Type: Bug
> Affects Versions: 5.5.0.Final, 5.6.0.Final, 6.0.0.Final, 6.0.1.Final, 6.1.0.Final, 6.2.0.CR4
> Reporter: Francesco Peloi
> Assignee: Mario Fusco
>
> Hi there,
> we are having some serious issues with some rules, they are throwing a NullPointerException and we don't understand why. I have tried to narrow down the problem to the smallest rule possible, now this rule doesn't really make much sense put like this but the real rule is more complex with more constraints. At the end the result is the same: a NPE.
> I have tried it with many Drools versions from 5.x to latest 6.3.0-SNAPSHOT.
> I tested this in isolation with the minimum amount of code possible, and attached it as well if someone wants to try it quickly.
> Note that if line 2 of the when:
> $a : Integer()
> is moved as first line, the rule runs ok.
> Please find the reproducer here: https://groups.google.com/forum/#!topic/drools-usage/-oNqu3l4cqE
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (JASSIST-243) Create class by abstract generic template
by Karol Kowalczyk (JIRA)
[ https://issues.jboss.org/browse/JASSIST-243?page=com.atlassian.jira.plugi... ]
Karol Kowalczyk edited comment on JASSIST-243 at 2/12/15 3:10 AM:
------------------------------------------------------------------
I'd like to generate new class from generic abstract template. A try to get this by javassist like this:
CtClass newClass = POOL.makeClass("test.templates.impl.GeneratedBigDecimalAction", genericAbstractTemplateClass);
String newGenericSignature="<Ljava/math/BigDecimal;Ljava/lang/String;Ltest/impl/NumberLogic;>Ltest/impl/ActionRoot<Ljava/math/BigDecimal;Ljava/lang/String;Ltest/impl/NumberLogic;>;Ltest/templates/api/IActionNumber2<Ljava/math/BigDecimal;Ljava/lang/String;>;"
newClass.setGenericSignature(genericSignature);
newClass.writeFile("target\test-classes");
newClass.POOL.get(newClass.getName());
But when I try to compile java sources with generated newClass test.templates.impl.GeneratedBigDecimalAction.class, a have error like this:
src\test\java\test\BigDecimalActionTest.java:[13,-1] cannot access test.templates.impl.GeneratedBigDecimalAction
bad class file: target\test-classes\test\templates\impl\GeneratedBigDecimalAction.class
bad signature: <null> bu
Why?
1. source of template (generic abstract template)
package test.templates.impl;
import test.impl.INumberLogic;
import test.impl.ActionRoot;
import java.util.Collection;
import test.templates.api.IActionNumber2;
public abstract class AActionNumber<
Dto extends Number,
Pk,
L extends INumberLogic<Dto, Pk>> extends ActionRoot<Dto, Pk, L>
implements IActionNumber2<Dto, Pk> {
final protected transient Logger logger = LoggerFactory
.getLogger(getClass());
public AActionNumber() throws Exception {
super();
}
public Class<Dto> getPersistentClass() {
Class<Dto> result = null;
if (logic != null) {
result = logic.getPersistentClass();
}
return result;
}
@Override
public String echo(String a) {
return a;
}
}
2. generic super class ActionRoot:
package test.impl;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.TypeVariable;
public class ActionRoot<
Dto extends Number,
Pk,
L extends INumberLogic<Dto, Pk>> {
protected L logic;
@SuppressWarnings({ "unchecked" })
public ActionRoot() throws Exception {
Class<?> tmpClass = this.getClass();
while (!(tmpClass.getGenericSuperclass() instanceof ParameterizedType)) {
tmpClass = tmpClass.getSuperclass();
}
Class<L> logicBeanClass = (Class<L>) ((ParameterizedType) tmpClass
.getGenericSuperclass()).getActualTypeArguments()[2];
try {
logic = (L) logicBeanClass.newInstance();
} catch (Exception ex) {
throw new Exception("Problem z utworzeniem obiektu beanu logic", ex);
}
}
}
3. Generic interfaces:
package test.impl;
public interface INumberLogic<Dto extends Number, Pk> {
Class<Dto> getPersistentClass();
}
package test.templates.api;
public interface IActionNumber2<Dto extends Number, Pk> {
String echo(String a);
}
was (Author: karol.kowalczyk):
I'd like to generate new class from generic abstract template. A try to get this by javassist like this:
CtClass newClass = POOL.makeClass("test.templates.impl.GeneratedBigDecimalAction", genericAbstractTemplateClass);
String newGenericSignature="<Ljava/math/BigDecimal;Ljava/lang/String;Ltest/impl/NumberLogic;>Ltest/impl/ActionRoot<Ljava/math/BigDecimal;Ljava/lang/String;Ltest/impl/NumberLogic;>;Ltest/templates/api/IActionNumber2<Ljava/math/BigDecimal;Ljava/lang/String;>;"
newClass.setGenericSignature(genericSignature);
newClass.writeFile("target/testClasses");
newClass.POOL.get(newClass.getName());
But when I try to compile java sources with generated newClass test.templates.impl.GeneratedBigDecimalAction.class, a have error like this:
src\test\java\test\BigDecimalActionTest.java:[13,-1] cannot access test.templates.impl.GeneratedBigDecimalAction
bad class file: target\test-classes\test\templates\impl\GeneratedBigDecimalAction.class
bad signature: <null> bu
Why?
1. source of template (generic abstract template)
package test.templates.impl;
import test.impl.INumberLogic;
import test.impl.ActionRoot;
import java.util.Collection;
import test.templates.api.IActionNumber2;
public abstract class AActionNumber<
Dto extends Number,
Pk,
L extends INumberLogic<Dto, Pk>> extends ActionRoot<Dto, Pk, L>
implements IActionNumber2<Dto, Pk> {
final protected transient Logger logger = LoggerFactory
.getLogger(getClass());
public AActionNumber() throws Exception {
super();
}
public Class<Dto> getPersistentClass() {
Class<Dto> result = null;
if (logic != null) {
result = logic.getPersistentClass();
}
return result;
}
@Override
public String echo(String a) {
return a;
}
}
2. generic super class ActionRoot:
package test.impl;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.TypeVariable;
public class ActionRoot<
Dto extends Number,
Pk,
L extends INumberLogic<Dto, Pk>> {
protected L logic;
@SuppressWarnings({ "unchecked" })
public ActionRoot() throws Exception {
Class<?> tmpClass = this.getClass();
while (!(tmpClass.getGenericSuperclass() instanceof ParameterizedType)) {
tmpClass = tmpClass.getSuperclass();
}
Class<L> logicBeanClass = (Class<L>) ((ParameterizedType) tmpClass
.getGenericSuperclass()).getActualTypeArguments()[2];
try {
logic = (L) logicBeanClass.newInstance();
} catch (Exception ex) {
throw new Exception("Problem z utworzeniem obiektu beanu logic", ex);
}
}
}
3. Generic interfaces:
package test.impl;
public interface INumberLogic<Dto extends Number, Pk> {
Class<Dto> getPersistentClass();
}
package test.templates.api;
public interface IActionNumber2<Dto extends Number, Pk> {
String echo(String a);
}
> Create class by abstract generic template
> -----------------------------------------
>
> Key: JASSIST-243
> URL: https://issues.jboss.org/browse/JASSIST-243
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.19.0-GA
> Reporter: Karol Kowalczyk
> Assignee: Shigeru Chiba
> Priority: Critical
>
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months