• Post Reply Bookmark Topic Watch Topic
  • New Topic

ActiveMQConnectionFactory Object  RSS feed

 
Alissa Horner
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a portion of my Java application, which will be called multiple times. I have a question about this.

String URL = ActiveMQ.getUrl();
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(URL);
Connection connection = connectionFactory.createConnection();
connection.start();


How would I modify my code so that every new object will have a unique URL? I do not want the objects to have the same URL.
 
Paul Clapham
Sheriff
Posts: 22819
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To me that code says "What's the URL of the ActiveMQ server? Okay, get me a connection factory from the server at that URL."

So... what are the objects that you think should have unique URLs, and why do you think that?
 
Carey Brown
Saloon Keeper
Posts: 3310
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Paul mentions, it's not clear to what purpose you need a unique identifier.

However, if you do find a place where it is appropriate to have a unique identifier you might look here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!