Ahh, I see now. Thanks Hiram. "broker_1" gets returned from getAuthority(), not getHost() in this case.
* * * Still does not look like the URI being invalid (or valid) has anything to do with this WARN though :-( --jason -----Original Message----- From: [EMAIL PROTECTED] on behalf of Hiram Chirino Sent: Thu 5/4/2006 7:14 AM To: [email protected] Subject: Re: WARN MulticastDiscoveryAgent - brokerName not set ? new URI("foo://broker_1").getHost() == null weird. but that's the way it works. :( On 5/4/06, Jason Dillon <[EMAIL PROTECTED]> wrote: > Okay. Thanks for the clarification. Maybe I drank to much already, but: > > new URI("foo://broker_1"); > > and: > > new URL("foo://[EMAIL PROTECTED]"); > > are both valid URI instances. > > So I am a little confused why broker_1 is bad. > > Anyways, while I'd like to understand the constraints for broker names, I'd > like to know why the MulticastDiscoveryAgent thinks that broker's name was > not set. > > Am I missing an attribute somewhere? > > --jason > > > -----Original Message----- > From: James Strachan [mailto:[EMAIL PROTECTED] > Sent: Thu 5/4/2006 12:37 AM > To: [email protected] > Subject: Re: WARN MulticastDiscoveryAgent - brokerName not set ? > > We use URI syntax so whatever this JavaDoc says goes - along with RFC 2396 > http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html > > On 5/4/06, Jason Dillon <[EMAIL PROTECTED]> wrote: > > > > Why is broker_1 bad? I can name my host broker_1 (just tried adding an > > entry to /etc/hosts). > > > > Sorry, not trying to be argumentative, just trying to understand... :-\ > > > > --jason > > > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] on behalf of Hiram Chirino > > Sent: Wed 5/3/2006 10:00 PM > > To: [email protected] > > Subject: Re: WARN MulticastDiscoveryAgent - brokerName not set ? > > > > oh but it does not need to match the hostname of the machine. so > > broker1 broker2 are fine broker names but broker_1 is a bad one. > > > > On 5/4/06, Hiram Chirino <[EMAIL PROTECTED]> wrote: > > > It because we will use the broker name in the hostname part of URLs > > > like vm://brokername > > > etc. > > > > > > On 5/4/06, Jason Dillon <[EMAIL PROTECTED]> wrote: > > > > If I set <broker brokerName="localhost" ...> or any other valid > > hostname lie "myhost", I still see the WARN from MulticastDiscoveryAgent. > > > > > > > > Why must the brokerName be a valid hostname? What if I have multipule > > brokers on the same host? > > > > > > > > --jason > > > > > > > > > > > > -----Original Message----- > > > > From: [EMAIL PROTECTED] on behalf of Hiram Chirino > > > > Sent: Wed 5/3/2006 9:20 PM > > > > To: [email protected] > > > > Subject: Re: WARN MulticastDiscoveryAgent - brokerName not set ? > > > > > > > > I don't think that's valid URI hostname. We need better validation > > > > for these kinds of settings but the broker name must also be a valid > > > > host name that you can put in a URI. > > > > > > > > On 5/1/06, Jason Dillon <[EMAIL PROTECTED]> wrote: > > > > > Why does ActiveMQ spit this warning out: > > > > > > > > > > <snip> > > > > > WARN MulticastDiscoveryAgent - brokerName not set > > > > > </snip> > > > > > > > > > > I do believe that my broker name is set: > > > > > > > > > > <snip> > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > > > > > > > <beans xmlns="http://activemq.org/config/1.0"> > > > > > > > > > > <bean > > > > > class=" > > org.springframework.beans.factory.config.PropertyPlaceholderConfi > > > > > gurer"> > > > > > <property name="systemPropertiesModeName" > > > > > value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/> > > > > > </bean> > > > > > > > > > > <broker brokerName="[EMAIL PROTECTED]" useJmx="true"> > > > > > > > > > > <managementContext> > > > > > <managementContext connectorPort="1099" > > > > > jmxDomainName="org.apache.activemq"/> > > > > > </managementContext> > > > > > > > > > > <persistenceAdapter> > > > > > <journaledJDBC journalLogFiles="5" dataDirectory="$ > > > > > {activemq.home}/var/data"/> > > > > > </persistenceAdapter> > > > > > > > > > > <transportConnectors> > > > > > <transportConnector name="default" > > uri="tcp://localhost: > > > > > 61616" discoveryUri="multicast://default"/> > > > > > </transportConnectors> > > > > > > > > > > <networkConnectors> > > > > > <networkConnector name="default" uri="multicast:// > > > > > default" failover="true"/> > > > > > </networkConnectors> > > > > > > > > > > </broker> > > > > > > > > > > </beans> > > > > > </snip> > > > > > > > > > > Broker name should be "[EMAIL PROTECTED]". > > > > > > > > > > Why does ActiveMQ think that it is not set? > > > > > > > > > > --jason > > > > > This email and any attachment(s) thereto, are intended for the use > > of > > > > > the addressee(s) named herein and may contain legally privileged and > > or > > > > > confidential information under applicable law. If you are not the > > > > > intended recipient of this e-mail, you are hereby notified any > > > > > dissemination, distribution or copying of this email, and any > > attachment(s) > > > > > thereto, is strictly prohibited. If you have received this > > communication > > > > > in error, please notify the sender at 415-281-2200 or via return > > e-mail at > > > > > [EMAIL PROTECTED] and permanently delete the original copy > > and > > > > > any copy of any e-mail, and any printout thereof. Thank you for your > > > > > cooperation. > > > > > > > > > > > > > > > > > > > > > > -- > > > > Regards, > > > > Hiram > > > > > > > > This email and any attachment(s) thereto, are intended for the use of > > > > the addressee(s) named herein and may contain legally privileged and > > or > > > > confidential information under applicable law. If you are not the > > > > intended recipient of this e-mail, you are hereby notified any > > > > dissemination, distribution or copying of this email, and any > > attachment(s) > > > > thereto, is strictly prohibited. If you have received this > > communication > > > > in error, please notify the sender at 415-281-2200 or via return > > e-mail at > > > > [EMAIL PROTECTED] and permanently delete the original copy and > > > > any copy of any e-mail, and any printout thereof. Thank you for your > > > > cooperation. > > > > > > > > > > > > > > > > > -- > > > Regards, > > > Hiram > > > > > > > > > -- > > Regards, > > Hiram > > > > This email and any attachment(s) thereto, are intended for the use of > > the addressee(s) named herein and may contain legally privileged and or > > confidential information under applicable law. If you are not the > > intended recipient of this e-mail, you are hereby notified any > > dissemination, distribution or copying of this email, and any > > attachment(s) > > thereto, is strictly prohibited. If you have received this communication > > in error, please notify the sender at 415-281-2200 or via return e-mail at > > [EMAIL PROTECTED] and permanently delete the original copy and > > any copy of any e-mail, and any printout thereof. Thank you for your > > cooperation. > > > > > > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > > This email and any attachment(s) thereto, are intended for the use of > the addressee(s) named herein and may contain legally privileged and or > confidential information under applicable law. If you are not the > intended recipient of this e-mail, you are hereby notified any > dissemination, distribution or copying of this email, and any attachment(s) > thereto, is strictly prohibited. If you have received this communication > in error, please notify the sender at 415-281-2200 or via return e-mail at > [EMAIL PROTECTED] and permanently delete the original copy and > any copy of any e-mail, and any printout thereof. Thank you for your > cooperation. > > -- Regards, Hiram
