[JBoss JIRA] (JGRP-1877) System.nanoTime() may be in the future
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1877?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-1877:
--------------------------------
But it does guarantee that when invoked at t0 and t1 that t1 > t0, even if negative, right ?
> System.nanoTime() may be in the future
> --------------------------------------
>
> Key: JGRP-1877
> URL: https://issues.jboss.org/browse/JGRP-1877
> Project: JGroups
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.5.1, 3.6
>
>
> According to the javadoc, {{System.nanoTime()}} should only be used to measure _elapsed time_, but not compute a _target time in the future_, as {{nanoTime()}} might return a a time in the future.
> Code like the one below might fail:
> {code:title=Responses.waitFor()|borderStyle=solid}
> public boolean waitFor(long timeout) {
> long wait_time;
> final long target_time=System.nanoTime() + TimeUnit.NANOSECONDS.convert(timeout, TimeUnit.MILLISECONDS); // ns
> lock.lock();
> try {
> while(!done && (wait_time=target_time - System.nanoTime()) > 0) {
> try {
> cond.await(wait_time,TimeUnit.NANOSECONDS);
> }
> catch(InterruptedException e) {
> }
> }
> return done;
> }
> finally {
> lock.unlock();
> }
> }
> {code}
> Investigate all occurrences where we use {{nanoTime()}} to compute a time in the future, and see what impact a future value value could have. Possibly replace with {{System.currentTimeMillis()}} or the _time service_.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 10 months
[JBoss JIRA] (WFBUILD-7) Allow feature packs to override a version of an artefact provided by a dependent feature pack
by Stuart Douglas (JIRA)
Stuart Douglas created WFBUILD-7:
------------------------------------
Summary: Allow feature packs to override a version of an artefact provided by a dependent feature pack
Key: WFBUILD-7
URL: https://issues.jboss.org/browse/WFBUILD-7
Project: WildFly Build Tools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Stuart Douglas
Assignee: Stuart Douglas
This will allow a feature pack to explicitly provide a new version of an artifact that is provided by a dependency feature pack. For example if wildfly-web wants to provide a more up to date version of undertow than what is provided in core.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 10 months
[JBoss JIRA] (JGRP-1879) log4j 2 suport error
by ming yue (JIRA)
[ https://issues.jboss.org/browse/JGRP-1879?page=com.atlassian.jira.plugin.... ]
ming yue updated JGRP-1879:
---------------------------
Description:
LogFactory suport jdk log,log4j,log4j 2,but useing code like this:
USE_JDK_LOGGER=isPropertySet(Global.USE_JDK_LOGGER);
IS_LOG4J_AVAILABLE=isAvailable("org.apache.log4j.Logger");
IS_LOG4J2_AVAILABLE=isAvailable("org.apache.logging.log4j.core.Logger");
initialize var flag,
the isAvailable function depend on ClassNotFoundException ,when useing log4j 2 Log4j 1.x bridge, has org.apache.log4j.Logger class ,then exception is not ClassNotFoundException ,change isAvailable cunction to:
protected static boolean isAvailable(String classname) {
try {
return Class.forName(classname) != null;
}
catch(Exception cnfe) {
return false;
}
}
was:
LogFactory suport jdk log,log4j,log4j 2,bug useing USE_JDK_LOGGER=isPropertySet(Global.USE_JDK_LOGGER);
IS_LOG4J_AVAILABLE=isAvailable("org.apache.log4j.Logger");
IS_LOG4J2_AVAILABLE=isAvailable("org.apache.logging.log4j.core.Logger");
initialize var flag,
the isAvailable function depend on ClassNotFoundException ,when useing log4j 2 Log4j 1.x bridge, has org.apache.log4j.Logger class ,then exception is not ClassNotFoundException ,change isAvailable to:
protected static boolean isAvailable(String classname) {
try {
return Class.forName(classname) != null;
}
catch(Exception cnfe) {
return false;
}
}
> log4j 2 suport error
> ---------------------
>
> Key: JGRP-1879
> URL: https://issues.jboss.org/browse/JGRP-1879
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.4.4, 3.5
> Environment: jdk 7
> Reporter: ming yue
> Assignee: Bela Ban
>
> LogFactory suport jdk log,log4j,log4j 2,but useing code like this:
> USE_JDK_LOGGER=isPropertySet(Global.USE_JDK_LOGGER);
> IS_LOG4J_AVAILABLE=isAvailable("org.apache.log4j.Logger");
> IS_LOG4J2_AVAILABLE=isAvailable("org.apache.logging.log4j.core.Logger");
> initialize var flag,
> the isAvailable function depend on ClassNotFoundException ,when useing log4j 2 Log4j 1.x bridge, has org.apache.log4j.Logger class ,then exception is not ClassNotFoundException ,change isAvailable cunction to:
> protected static boolean isAvailable(String classname) {
> try {
> return Class.forName(classname) != null;
> }
> catch(Exception cnfe) {
> return false;
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 10 months
[JBoss JIRA] (JGRP-1879) log4j 2 suport error
by ming yue (JIRA)
ming yue created JGRP-1879:
------------------------------
Summary: log4j 2 suport error
Key: JGRP-1879
URL: https://issues.jboss.org/browse/JGRP-1879
Project: JGroups
Issue Type: Bug
Affects Versions: 3.5, 3.4.4
Environment: jdk 7
Reporter: ming yue
Assignee: Bela Ban
LogFactory suport jdk log,log4j,log4j 2,bug useing USE_JDK_LOGGER=isPropertySet(Global.USE_JDK_LOGGER);
IS_LOG4J_AVAILABLE=isAvailable("org.apache.log4j.Logger");
IS_LOG4J2_AVAILABLE=isAvailable("org.apache.logging.log4j.core.Logger");
initialize var flag,
the isAvailable function depend on ClassNotFoundException ,when useing log4j 2 Log4j 1.x bridge, has org.apache.log4j.Logger class ,then exception is not ClassNotFoundException ,change isAvailable to:
protected static boolean isAvailable(String classname) {
try {
return Class.forName(classname) != null;
}
catch(Exception cnfe) {
return false;
}
}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 10 months
[JBoss JIRA] (WFLY-3791) Allow deployment initialization to have read-access to portions of the model
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-3791?page=com.atlassian.jira.plugin.... ]
Brian Stansberry resolved WFLY-3791.
------------------------------------
Fix Version/s: (was: Awaiting Volunteers)
Resolution: Rejected
I expect this is failing during boot. It might kind of work if the app is deployed post-boot.
I say "kind of work" as the read would not see the unpublished copy of the configuration model that is associated with the management request that triggered deployment. That copy is not visible outside the context of that management request until it is committed, and it's not committed until lifecycle methods in the deployed components are completed.
It wouldn't work during boot because the subsystem configuration it's reading only exists in that unpublished model.
This never worked differently than I describe, and we are not going to make it work. Therefore, I'm rejecting this feature request.
> Allow deployment initialization to have read-access to portions of the model
> ----------------------------------------------------------------------------
>
> Key: WFLY-3791
> URL: https://issues.jboss.org/browse/WFLY-3791
> Project: WildFly
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Domain Management
> Environment: Java 7
> Reporter: ofbiz brazil
>
> Hello,
> When there's a client trying to list a node for a security section, Wildfly says it does not exist but on Jboss 7.1.1 it works fine.
> Java Code:
> {code:java}
> final ModelNode request = new ModelNode();
> request.get(ClientConstants.OP).set("read-resource");
> request.get("recursive").set(true);
> request.get(ClientConstants.OP_ADDR).add("subsystem", "security");
> final ModelControllerClient client = ModelControllerClient.Factory.create(InetAddress.getByName("127.0.0.1"), 9999);
> final ModelNode response = client.execute(new OperationBuilder(request).build());
> final String section = response.get(ClientConstants.RESULT).get("security-domain")
> .get("pw_MSSQL_CAS_DS")
> {code}
> Result:
> ---------
> {code}
> {
> "outcome" => "failed",
> "failure-description" => "JBAS014807: Management resource '[(\"subsystem\" => \"security\")]' not found",
> "rolled-back" => true
> }
> {code}
> Cheers,
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 10 months
[JBoss JIRA] (WFLY-3810) Implement graceful shutdown for mod_cluster
by Stuart Douglas (JIRA)
Stuart Douglas created WFLY-3810:
------------------------------------
Summary: Implement graceful shutdown for mod_cluster
Key: WFLY-3810
URL: https://issues.jboss.org/browse/WFLY-3810
Project: WildFly
Issue Type: Sub-task
Security Level: Public (Everyone can see)
Components: Clustering
Reporter: Stuart Douglas
Assignee: Paul Ferraro
In the pre-suspend phase the mod cluster subsystem should inform the load balancer that the deployment is no longer available.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 10 months
[JBoss JIRA] (DROOLS-592) Condition Evaluator should instantiate argument only once.
by david hendi (JIRA)
david hendi created DROOLS-592:
----------------------------------
Summary: Condition Evaluator should instantiate argument only once.
Key: DROOLS-592
URL: https://issues.jboss.org/browse/DROOLS-592
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 6.2.0.Beta1
Reporter: david hendi
Assignee: Mark Proctor
Priority: Optional
the argument(s) used within the evaluate method of a Conditional Evaluator should instantiate argument only once in order to reduce object creation and GC.
current generated class:
public class ConditionEvaluatorfff283c427e34a39877bce16cac05521
implements ConditionEvaluator
{
private static final String EXPRESSION = "!( ids contains 614201302l )";
private final Declaration[] declarations;
public ConditionEvaluatorfff283c427e34a39877bce16cac05521(Declaration[] paramArrayOfDeclaration)
{
this.declarations = paramArrayOfDeclaration;
}
public boolean evaluate(InternalFactHandle paramInternalFactHandle, InternalWorkingMemory paramInternalWorkingMemory, LeftTuple paramLeftTuple)
{
Collection localCollection = ((Context)paramInternalFactHandle.getObject()).getIds();
Long localLong = new Long("614201302");
return !(localLong == null ? false : localCollection == null ? false : EvaluatorHelper.contains(localCollection, localLong));
}
}
proposed class:
public class ConditionEvaluatorfff283c427e34a39877bce16cac05521
implements ConditionEvaluator
{
private static final String EXPRESSION = "!( ids contains 614201302l )";
private static Long localLong = new Long("614201302");
private final Declaration[] declarations;
public ConditionEvaluatorfff283c427e34a39877bce16cac05521(Declaration[] paramArrayOfDeclaration)
{
this.declarations = paramArrayOfDeclaration;
}
public boolean evaluate(InternalFactHandle paramInternalFactHandle, InternalWorkingMemory paramInternalWorkingMemory, LeftTuple paramLeftTuple)
{
Collection localCollection = ((Context)paramInternalFactHandle.getObject()).getIds();
return !(localLong == null ? false : localCollection == null ? false : EvaluatorHelper.contains(localCollection, localLong));
}
}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
9 years, 10 months