[jboss-jira] [JBoss JIRA] (AS7-5010) Stack overflow in management API with many Bundles deployed

David Bosschaert (JIRA) jira-events at lists.jboss.org
Mon Jun 25 06:40:12 EDT 2012


    [ https://issues.jboss.org/browse/AS7-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703156#comment-12703156 ] 

David Bosschaert commented on AS7-5010:
---------------------------------------

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

        


More information about the jboss-jira mailing list