Eike Stepper wrote:

hi,

one of my components is disposed in response to "finalizing a proxy".
could you please explain what that means and how i can prevent it?

Use the 'collection' attribute in the @avalon.component declaration.

E.g.:

  @avalon.component name="whatever"
    lifestyle="singleton" collection="hard"

Allowable options include 'hard', 'soft' and 'weak'. Hard refs will not be released without an explicit release by the consumer. Soft means that the component will be garbage collected if no references to the component exists and a memory contention occurs. Soft means that a non-referenced component will be released as the discretion of the jvm.

Steve.

in the log the following lines appear:

[DEBUG  ] (app.net4j.socket.PassiveSocketConnector.proxy): Finalizing proxy [22566565]
(appliance:/app/net4j/socket/PassiveSocketConnector).
[DEBUG  ] (app.net4j.socket.PassiveSocketConnector.proxy): Releasing component 
[22566565]
(appliance:/app/net4j/socket/PassiveSocketConnector).
[DEBUG  ] (app.net4j.socket.PassiveSocketConnector.lifecycle): etherialization
[DEBUG  ] (app.net4j.socket.PassiveSocketConnector.lifecycle): applying shutdown
[INFO   ] (app.net4j.socket.PassiveSocketConnector): disconnected
[DEBUG  ] (app.net4j.ConnectionManager): deregistered connector: [EMAIL PROTECTED], 
id=1
[DEBUG  ] (app.net4j.socket.PassiveSocketConnector.lifecycle): applying disposal

the component is declared transient and created when a
ServerSocketChannel accept()s a SocketChannel.
the handle to the component (proxy) that is originally resolved
is thrown away with the stack frame, but before it is registered
with a ConnectionManager, so that it should not be subject to gc.

please help!

/eike





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--

|---------------------------------------|
| Magic by Merlin                       |
| Production by Avalon                  |
|                                       |
| http://avalon.apache.org              |
|---------------------------------------|

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to