[
https://issues.jboss.org/browse/AS7-5010?page=com.atlassian.jira.plugin.s...
]
David Bosschaert edited comment on AS7-5010 at 6/25/12 6:39 AM:
----------------------------------------------------------------
Just to make sure that I'm doing this correctly. Let's say I have the following
code that was using completeStep():
{code:java}public void execute(OperationContext context, ModelNode operation) throws
OperationFailedException {
Activation val =
Activation.valueOf(operation.require(ModelDescriptionConstants.VALUE).asString().toUpperCase(Locale.ENGLISH));
ModelNode node = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
node.get(ModelConstants.ACTIVATION).set(val.toString().toLowerCase(Locale.ENGLISH));
context.completeStep();
}{code}
Is the following modification correct?
{code:java}Activation val =
Activation.valueOf(operation.require(ModelDescriptionConstants.VALUE).asString().toUpperCase(Locale.ENGLISH));
ModelNode node = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
final String oldVal = node.get(ModelConstants.ACTIVATION).asString();
node.get(ModelConstants.ACTIVATION).set(val.toString().toLowerCase(Locale.ENGLISH));
context.completeStep(new OperationContext.RollbackHandler() {
public void handleRollback(OperationContext context, ModelNode operation) {
ModelNode node =
context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
node.get(ModelConstants.ACTIVATION).set(oldVal);
}
});{code}
was (Author: bosschaert):
Just to make sure that I'm doing this correctly. Let's say I have the
following code that was using completeStep():
{code:java}public void execute(OperationContext context, ModelNode operation) throws
OperationFailedException {
Activation val =
Activation.valueOf(operation.require(ModelDescriptionConstants.VALUE).asString().toUpperCase(Locale.ENGLISH));
ModelNode node = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
node.get(ModelConstants.ACTIVATION).set(val.toString().toLowerCase(Locale.ENGLISH));
context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);
}{code}
Is the following modification correct?
{code:java}Activation val =
Activation.valueOf(operation.require(ModelDescriptionConstants.VALUE).asString().toUpperCase(Locale.ENGLISH));
ModelNode node = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
final String oldVal = node.get(ModelConstants.ACTIVATION).asString();
node.get(ModelConstants.ACTIVATION).set(val.toString().toLowerCase(Locale.ENGLISH));
context.completeStep(new OperationContext.RollbackHandler() {
public void handleRollback(OperationContext context, ModelNode operation) {
ModelNode node =
context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
node.get(ModelConstants.ACTIVATION).set(oldVal);
}
});{code}
Stack overflow in management API with many Bundles deployed
-----------------------------------------------------------
Key: AS7-5010
URL:
https://issues.jboss.org/browse/AS7-5010
Project: Application Server 7
Issue Type: Bug
Components: Domain Management, OSGi
Affects Versions: 7.1.1.Final
Reporter: Thomas Diesler
Assignee: David Bosschaert
Fix For: 7.2.0.Alpha1
Bernd says
{quote}
My Java 7 JVM is crashing in a Stack Overflow (which is a Bug initself). But while
inspecting the hs_err file (attached) I noticed that the OSGi Parser has a extremly deep
stack. I wonder if this is a endless loop bug or if it is caused by the many OSGi modules
I have deployed in this 7.1.1.final AS7.
I am not entirely shure what triggered the problem, at is happening after startup. But I
think it was related with clicking the OSGi Runtime Management in the JBoss Managagement
Console. There are roughly 250 bundles in the deployment list of the server group.
{quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira