[jboss-dev] Public IP address used by JBoss AS

Bela Ban bban at redhat.com
Wed May 26 12:27:51 EDT 2010



Brian Stansberry wrote:
>> All of this logic can be centralized (in JGroups it is in 1 place) 
>> and used everywhere.
>>
>
> If there is a single place where such configuration is allowed (e.g. an
> AS 7 domain configuration document) and all services that need to
> consume the value must get it from the domain model, fine. But that
> ain't how AS 6 works. And this discussion started with a request to get
> something in M4, so that's what I'm talking about. :)

And I was hoping you'd implement it by the time I arrive at work 
tomorrow :-) ha ha

Actually, I don't care where JGroups gets its value, whether it is from 
the XML config, system properties, default values etc. At the end of the 
day, JGroups looks at all the fields (in all protocols) annotated with 
@Property and intercepts setting of the value from a String.

I suppose something similar could be done in the AS: intercept setting 
the java.lang.reflect.Field and try to come up with a meaningful 
transformation of the Object for all fields of type InetAddress. E.g. 
Object could be a String ("192.168.1.5", "http1.dyndns.org", "GLOBAL" 
etc) or an Object (e.g. InetAddress).

> In AS 6, this kind of logic cannot be centralized in a single place.
> Just in clustering alone, the AS deals with 4 separate projects that
> each have their own configuration parsers.

That's why the logic to convert untyped values to typed (and meaningful 
values) should be in an interceptor placed in front of fields we want to 
convert (or sanity check)

-- 
Bela Ban
Lead JGroups / Clustering Team
JBoss



More information about the jboss-development mailing list