Daniel Kulp wrote:
On Thursday 24 May 2007 16:15, Andrea Smyth wrote:
If I'm reading this code correctly.....
The ClientLifeCycleManager holds on to all clients with strong
references. The only way to release it is to call "destroy()" on the
client.
The ClientLifeCycleManager (implementation) holds on to all client
lifecycle *listeners*, not the clients.
What exactly are yoy referring to?
Sorry. My bad.
However, in the RMManager, all clients that are created when RMManager is
registered as a ClientLifeCycleListener go into
RMManger.recoverReliableEndpoint(...). If there is a store and
recoverReliableEndpoint, then for all clients, a RMEndpoint object is
created and the endpoint and RMEndpoint objects are put in the
reliableEndpoints map, which is a strong map.
Right?
Yes, and this can be improved upon slightly by creating the RMEndpoint
only when there actually are messages to recover and resend. Otherwise
the creation of the RMEndpoint can be deferred until the client makes
its first request. Normally that should not make much of a difference
though.
If there is concern about the growth of the reliableEndpoint map in an
application with many shortlived clients using RM, I would recommend
that the application tells the runtime when it's done with a particular
client as the RMEndpoint object will then be removed from the map.
It looks like for normal cases (RM not used), store is null so it's not a
problem.
However, my major issue, I guess, is the API kind of implies that
the "ClientLifeCycleManager.clientDestroyed(...)" method will always be
called. I just don't see that as being true. I actually expect it to
rarely be called.
It's only called when the application explicitly informs the runtime
that a is destroyed. In connection with RM users may want to terminate
the client's current sequence when it is clear that no more messages
will be sent in the context of this sequence.
Also, clients that use non-anonymous ReplyTo, with or without RM, may
want to indicate that the ReplyTo, AcksTo listener on the client side
can be shut down.
If you prefer other names for the APIs I can of course change them.
Andrea.
Dan
Andrea.
That isn't a "normal" thing to do in a JAX-WS use case. Thus, for
normal JAX-WS development, all clients ever created are held onto
forever. All the resources they contain are never released.
Etc....
Am I reading that correctly? If so, -1. That needs to be fixed.
Dan
On Thursday 24 May 2007 13:33, [EMAIL PROTECTED] wrote:
Author: andreasmyth
Date: Thu May 24 10:33:11 2007
New Revision: 541364
URL: http://svn.apache.org/viewvc?view=rev&rev=541364
Log:
[JIRA CXF-139] Client-side recovery.
Added client lifecycle management interface to be notified of client
creation so that recovery can take place before client sends any
requests. Fixed minor bug in handling TerminateSequence invocation.
Added:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Client
Li feCycleListener.java (with props)
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Client
Li feCycleManager.java (with props)
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/Cl
ie ntLifeCycleManagerImpl.java (with props)
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMUt
il sTest.java (with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws
/r m/ClientPersistenceTest.java (with props) Removed:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws
/r m/PersistenceTest.java Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Client
.j ava
incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/bi
nd ing/soap/interceptor/SoapHeaderInterceptor.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/Cl
ie ntImpl.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/Se
rv erLifeCycleManagerImpl.java
incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Abst
ra ctEndpoint.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Prox
y. java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCo
nt extUtils.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEn
dp oint.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMMa
na ger.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMOu
tI nterceptor.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMUt
il s.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Retr
an smissionQueue.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Serv
an t.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap
/R etransmissionQueueImpl.java
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/Abst
ra ctEndpointTest.java
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/Prox
yT est.java
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEn
dp ointTest.java
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMMa
na gerTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws
/r m/oneway-client-crash.xml