[ 
https://issues.apache.org/jira/browse/ARTEMIS-2381?focusedWorklogId=262593&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-262593
 ]

ASF GitHub Bot logged work on ARTEMIS-2381:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Jun/19 20:12
            Start Date: 18/Jun/19 20:12
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on issue #2713: ARTEMIS-2381 
making setBrokerURL public as requested by Camel Devs
URL: https://github.com/apache/activemq-artemis/pull/2713#issuecomment-503293082
 
 
   @davsclaus this is what I did, I made setBrokerURL public, while doing that 
I made it fluent. I thought this is what you were after.
   
   if fluent style doesn't work on Camel, consider it done.. I'm removing the 
fluent style.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 262593)
    Time Spent: 0.5h  (was: 20m)

> ActiveMQJMSConnectionFactory - Allow to configure brokerURL via setter
> ----------------------------------------------------------------------
>
>                 Key: ARTEMIS-2381
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2381
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>            Assignee: clebert suconic
>            Priority: Major
>             Fix For: 2.10.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When setting up a ConnectionFactory for Artemis via the artemis-client, it 
> would be great if we can configure this via getter/setter style, which allows 
> to configure this nicely via properties such as from application.properties 
> etc.
> In Apache Camel we want to be able to do
> {code}
> camel.component.jms.connectionFactory=#class:org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory
> camel.component.jms.connectionFactory.brokerURL=tcp://localhost:61616
> {code}
> Notice how we in the 1st line refer to which class to use (creates via 
> default constructor) and then 2nd line sets the brokerURL, and the following 
> can be used to set other properties such as username and password etc.
> However as setBrokerURL is private we cannot do this
> {code}
>     private void setBrokerURL(String brokerURL) {
>         ConnectionFactoryParser cfParser = new ConnectionFactoryParser();
>         try {
>             URI uri = cfParser.expandURI(brokerURL);
>             this.serverLocator = ServerLocatorImpl.newLocator(uri);
>             cfParser.populateObject(uri, this);
>         } catch (Exception var4) {
>             throw new RuntimeException(var4.getMessage(), var4);
>         }
>         if (this.getUser() == null) {
>             this.setUser(DefaultConnectionProperties.DEFAULT_USER);
>         }
>         if (this.getPassword() == null) {
>             this.setPassword(DefaultConnectionProperties.DEFAULT_PASSWORD);
>         }
>     }
> {code}
> Would it be possible to make this method public?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to