avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Commented: (RUNTIME-32) Transient objects already released are disposed again in Merlin shutdown
Date Fri, 11 Jun 2004 13:06:10 GMT
The following comment has been added to this issue:

     Author: syvalta
    Created: Fri, 11 Jun 2004 6:04 AM
       Body:
One additional note (not sure if this is a bug or intentional feature):  It seems that a component
can be released multiple times without errors/warnings showing in the log.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/RUNTIME-32?page=comments#action_36032

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/RUNTIME-32

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: RUNTIME-32
    Summary: Transient objects already released are disposed again in Merlin shutdown
       Type: Bug

     Status: Open
   Priority: Major

    Project: Merlin Runtime Platform
   Versions:
             3.3.0

   Assignee: Stephen McConnell
   Reporter: syvalta

    Created: Fri, 11 Jun 2004 5:46 AM
    Updated: Fri, 11 Jun 2004 6:04 AM
Environment: Probably all (tested with WinXP SP1, j2sdk 1.4.2_04 and Cygwin 1.5.10-3)

Description:
If multiple transient objects are got by singleton component and released, they are disposed
again in server shutdown.

void processSomething() {
  Foo foo = (Foo) m_manager.lookup(Foo.class.getName());
  foo.doSomething();
  m_manager.release(foo);
}

And if in FooImpl's dispose() we throw exception in case it is disposed more than once, it
results in following:

[WARN   ] (test.foo.lifecycle): Ignoring component source disposal error.
---- runtime exception report --------------------------------------------------

Exception: java.lang.IllegalStateException
Message: Already disposed
---- stack trace ---------------------------------------------------------------

java.lang.IllegalStateException: Already disposed
test.FooImpl.dispose(FooImpl.java:35)
org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
org.apache.avalon.activation.impl.DefaultComponentFactory.etherialize(DefaultComponentFactory.java:216)
org.apache.avalon.activation.impl.AbstractLifestyleManager.finalize(AbstractLifestyleManager.java:160)
org.apache.avalon.activation.impl.TransientLifestyleManager.decommission(TransientLifestyleManager.java:83)
org.apache.avalon.activation.impl.DefaultAppliance.decommission(DefaultAppliance.java:114)
org.apache.avalon.activation.impl.DefaultRuntime.decommission(DefaultRuntime.java:97)
org.apache.avalon.composition.model.impl.DefaultSystemContext.decommission(DefaultSystemContext.java:373)
org.apache.avalon.composition.model.impl.DefaultDeploymentModel.decommission(DefaultDeploymentModel.java:131)
org.apache.avalon.composition.model.impl.DefaultContainmentModel.decommission(DefaultContainmentModel.java:275)
org.apache.avalon.composition.model.impl.DefaultContainmentModel.decommission(DefaultContainmentModel.java:275)
org.apache.avalon.merlin.impl.DefaultKernel.shutdown(DefaultKernel.java:233)
org.apache.avalon.merlin.impl.DefaultFactory$1.run(DefaultFactory.java:847)
--------------------------------------------------------------------------------



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message