activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From malina <malina...@o2.pl>
Subject Re: Validation ActiveMQ URI
Date Thu, 22 Aug 2013 07:36:39 GMT
Thanks for your answer ceposta:)
Ye , i want validate correct parameters before i establish connection  (here
is sample of my code):
String url =
"failover:(tcp://localhost:61616,tcp://remotehost:61616)?initialReconnectDelay=100";
UrlValidator urlValidator = new
UrlValidator(UrlValidator.ALLOW_ALL_SCHEMES);
urlValidator.isValid(url);  (this validation is to strict because it accept
only Url like tcp://,udp://,ssl:// (its depends on java.net.Uri), but dont
accept parameters like failover:,fanout,vm:)
ActiveMQConnectionFactory activemg = new ActiveMQConnectionFactory();
activemg.setBrokerURL(url);
activemg.createConnection();

I used URLValidator from org.apache.commons.validator package. 
I couldn't find something to resolve my problem in documentation, but if you
said  it doesn't exist, that mean i must write my own validator ;(



--
View this message in context: http://activemq.2283324.n4.nabble.com/Validation-ActiveMQ-URI-tp4670551p4670571.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message