You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by Jonathan Pierce <jo...@gmail.com> on 2012/12/22 03:36:02 UTC

Property Substitution in Filter attribute of Service Reference

First off, great work.  The Aries Blueprint implementation has been
invaluable to our team and our product.  One additional feature that would
be very beneficial would be to allow for property substitutions (from a
Property-Placeholder) within the filter attribute of a service reference or
reference-list.  I had come across this question (
http://mail-archives.apache.org/mod_mbox/aries-user/201211.mbox/%3C1352347133317-4025643.post%40n3.nabble.com%3E),
but there was no response.

So I started looking through the source code, and it seems like it may be
possible with a few modifications, but I'm probably missing something.
 It's easy enough to modify AbstractPropertyPlaceholder.java to substitute
within the filter attribute.  However, I found that replacement happens
after the references are checked for availability.  The next thing I tried
was modifying the BlueprintContainerImpl doRun method to skip the
WaitForInitialReferences state and go directly to
InitialReferencesSatisfied.  On the surface this seems okay, because the
next state is WaitForInitialReferences2, which seems to do the same checks
as WaitForInitialReferences did.

After making that change I was able to perform substitutions on the filter
attribute.

Sorry for all the background, on to my question:  I'm wondering why there
were two checks in the first place (WaitForInitialReferences &
WaitForInitialReferences2), and what the consequences would be of removing
the first one would be?  I haven't noticed any so far, but I've done only
limited testing with my fairly straight forward project.

Thanks in advance.

Jonathan