juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Slack" <no-re...@slack.com>
Subject [Slack] Notifications from the ASF team for May 31st, 2017 at 8:17 AM
Date Wed, 31 May 2017 12:17:24 GMT
Hi Dev Juneau,

You have a new direct message from the ASF team


View in the archives:

Digest.AI (8:01 AM, May 31st)
Hi Dev, 
*Here’s your digest for May 31st 2017*
There are 52 messages yesterday, and the most active user is jamesbognar

 @jamesbognar: The HTTP spec allows it.  For example, one common way of
representing lists is duplication of keys…e.g.
&keyl1&keyl2&keyl3.  But some sort of RuntimeException in this
case is a good idea.
 @sblackmon: Brings up an interesting point, when binding a rest proxy
where you expect the upstream to fail on certain conditions, whether
there's a means to configure the client to check that conditionals are /
are not met
 I suppose that logic could go in a request I tercweptor
 Request interceptor interface is not great for that use case though.
Can be tricky to get at the params, then only have httpcomponents
objects to work with, and method signature is void so any abort would
have to be an HttpException
 @jamesbognar: I’m able to reproduce the first issue…
	public static interface RequestBeanProxy {

		@RemoteMethod(httpMethodET", pathtest1")
		String queryIfNE1(@RequestBean RequestBean1 rb);

		public static interface RequestBean1 {
			@QueryIfNE(value", serializermmyPartSerializer.class)
			ListString getA();

		public static class RequestBean1Impl implements RequestBean1 {
			public ListString getA() {
				return new AListString().append("foo").append("bar");
The problem is that it’s being interpreted as two different bean
properties:  “a” and “b”.  So we’re serializing the parameters
 @jamesbognar: I’m not able reproduce _when @RequestBean is a class
with @BeanProperty and @QueryNE on each getter, no interface involved
aside from Serializable - remote proxy works, sort of, but with each
execution i’m getting some number of java.lang.RuntimeException:
org.apache.streams.twitter.api.UsersLookupRequest: Class is not a bean. 

Here’s my code…
		@RemoteMethod(httpMethodET", pathtest3")
		String queryIfNE3(@RequestBean RequestBean2 rb);

		public static class RequestBean2 {
			@QueryIfNE(value", serializermmyPartSerializer.class)
			public ListString getX() {
				return new AListString().append("foo").append("bar");
			@QueryIfNE(value", serializermmyPartSerializer.class)
			public ListString getY() {
				return new AListString().append("foo").append("bar");
 Can I see what UsersLookupRequest looks like?
 @jamesbognar: I’ll try to reproduce the problem using your class. 
 On a side note, I wonder if we should rename @BeanProperty(name) to
@BeanProperty(value) to match Jackson.  It looks cleaner that way.
 Or include both name and value and make them synonymous.
 @jamesbognar: yea
 Perhaps both should have both ‘name’ and ‘value’, and you can
just choose the one you want.
 So @BeanProperty(“foo”) and @BeanProperty(nameٜfoo”) would
mean the same thing.
 @jamesbognar: I was able to reproduce the “Class is not a bean”
exception.  It was a race condition.  I have a fix for it.
 The fix for the duplicate parameters will take more work.  I need to
change the way I find bean property method annotations.  It’s a hassle
because annotations on methods are not inherited, so I have to search
the class hierarchy for the “same” method on parent classes.
 Also note that if you plan on using the proxy class in a multithreaded
environment, you’ll need to call the pooled() method on the
RestClientBuilder class.  Otherwise, you’ll see “Connection still
allocated” exceptions thrown from within HttpClient.

 One side note…..with Juneau, you can define fluent-style setters, so
there’s no need for the separate setX() and withX() methods in the
UsersLookupRequest class.

 @sblackmon: Id hope we can make it fully parallel, up to a max # of
concurrent threads in the pool. Makes more sense for streams use case to
have a singleton accessor class and many concurrent connections
 A lot of time at scale is spent with http set up year down and waiting
for external service
 @jamesbognar: Another quick note….if you’re using the @BeanProperty
annotation on methods, there are no naming restrictions.  Anything with
one parameter is considered a setter, and anything with zero parameters
is considered a getter.  It allows you to define fluent-style setters
such as the following example from AtomFeedResource…

			feed 				feed("tag:juneau.sample.com,2013:1", "Juneau ATOM specification",
				.subtitle(text("html").text("A emlot/em of effort went into making
this effortless"))
					link("alternate", "text/html",
					link("self", "application/atom+xml",
				.rights("Copyright (c) 2016, Apache Foundation")
					entry("tag:juneau.sample.com,2013:1.2345", "Juneau ATOM
specification snapshot", "2013-05-08T12:29:29Z")
						link("alternate", "text/html",
						link("enclosure", "audio/mpeg",
						person("James Bognar").uri(new
						person("Barry M. Caceres")
						.text("divp[Update: Juneau supports ATOM.]/p/div")

*Links shared by your team today:*

* * *

You can snooze these notifications for
an hour:
eight hours:
a day:
three days:
or the next week:

You can also turn email notifications off:

For more detailed preferences, see your account page:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message