[jboss-dev-forums] [Design of Management Features on JBoss] - Re: Contents of jnp-service.url file

bstansberry@jboss.com do-not-reply at jboss.com
Thu Jul 2 10:40:03 EDT 2009


I don't think the following should drive this decision, but is just an FYI for anyone interested.

C is cleaner from a server-side design POV.

This URL String ultimately comes from org.jnp.server.Main, which exposes

public List getBootstrapURLs()
public String getBootstrapURL()

(The latter works by picking the first element in the list returned by the former, which is clunky.)

It's appropriate this info comes from Main, as it understands what the URL format is.

A separate class NamingServiceURLWriter actually writes the file. It (IMHO correctly) knows nothing about the URL format; it just gets a String and knows how to write it to the file.

To do a) or b) above, the logic to pick a) or b) from the overall list is either going to have to go in Main, which is a mixing of concerns, or in NamingServiceURLWriter, which forces that class to understand how to parse the URLs. Using c) avoids this kind of problem.

Again, not a huge issue.



View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241510#4241510

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241510



More information about the jboss-dev-forums mailing list