Hi Sergey,
good points
Sergey Beryozkin-2 wrote:
>
> Just CC-ing to the dev list, as this feature is still being developed,
> given that CXF 2.2.6 will only be released early next year.
>
Agreed. I mentioned 2.2.6 in documentation to avoid confusion like this "I
am using latest available release 2.2.5 and there is not ATOM logging as
documentation describes". We can even say that it is available from "CXF
2.2.6 (or latest unstable snapshot version)".
Sergey Beryozkin-2 wrote:
>
> - At the moment the log events are embedded inside feeds, [...] it would
> make sense to let users choose that a single Atom entry
>
Agree, can be done easily as next strategy (converter class) so user has
full control of pair of format (converter) and batch size. I have to take a
look on AtomPub spec, I am still new to Atom stuff ;)
Sergey Beryozkin-2 wrote:
>
> - Atom specific : users should be able to choose how a log record is
> embedded inside a given entry. I like the idea of putting it
> into atom:entry:/atom:content of type application/xml, however some users
> may prefer the Atom extenstions, so it will be an
> atom:entry/log:logRecord...
>
Already done yesterday, you can find SingleEntryExtensionCoverter and
MultiEntryExtensionConverter classes in trunk.
Sergey Beryozkin-2 wrote:
>
> - It would be nice to let users easily inject customized WebClients (ex,
> preferring JSON or set with some additional headers, etc)
> from Spring, but it may actually be quite easy to do, they'll have to
> reconfigure a WebDeliverer bean and possibly list a default
> retrier bean ?
>
You can do it now on Spring XML confing level (without annotations so far),
more or less like this:
<bean id="wc" class="...WebClient" ... />
<bean id="wcd" class="...ext.logging.atom.WebClientDeliverer">
<constructor-arg><ref bean="wc" /><constructor-arg>
</bean>
<bean class="...ext.logging.atom.AtomPushBean">
<property name="deliverer"><ref bean="wcd"></property>
...
</bean>
I can imagine more tricky but for me dirty way (it is NOT DONE so far);
WebClientDeliverer used by default may have injected field like this:
@Resource("atom-deliverer") WebClient webclient;
and use it if injected by spring. This way one may simply define bean with
this hardcoded name and it is picked up wiring AtomPushBean, e.g.:
<bean id="atom-deliverer" class="...WebClient" ... />
<bean class="...ext.logging.atom.AtomPushBean" .. />
<!-- deliverer not customized here -->
</bean>
Sergey Beryozkin-2 wrote:
>
> - At the moment, the delivery will stop if a single delivery fails, unless
> a retry strategy is configured. I think it is reasonable.
> But I'm thinking of having a property such as a 'send and forget' one, but
> we can enable it once WebClient start supporting one
> ways.
>
Yes, I did "stop if a single delivery fails" intentionally; pressure is on
decorating deliverers. Send and forget also can be done as decorator of
deliverer - the one always returning "success" regardless returned value of
real deliverer. We can place this FireAndForgetDeliverer as predefined
strategy next to RetryingDeliverer.
Thanks for your thoughts Sergey,
cheers, andy.
--
View this message in context:
http://old.nabble.com/-New-feature--Logging-in-ATOM-Feeds-and-pushing-to-client-tp26452485p26476716.html
Sent from the cxf-user mailing list archive at Nabble.com.