prevent loading QoS files more than once

2 posts / 0 new
Last post
Last seen: 8 years 1 month ago
Joined: 10/09/2013
Posts: 4
prevent loading QoS files more than once

I've got a plug in architecture that uses DDS and several QoS files, plug-ins can be started and stopped at any time.   So when I load QoS files into the DomainParticipantFactory, I also put them into a Vector<String>.   This way I can test to see if they're already loaded before adding them preventing errors when loading a QoS file multiple times.   


Is there a more elegant solution to doing this?     

rose's picture
Last seen: 1 year 2 months ago
Joined: 08/22/2011
Posts: 148

Hello hagemeyp, 

You can call get_qos() on the DomainParticipantFactory to get access to the list of files, if you explicitly set them:


factoryQos.profile.url_profile is a sequence of strings that contains the list of files if you explicitly loaded them.  

It sounds like you are setting everything explicitly, but if you loaded the files through an environment variable (or if it was a USER_QOS_PROFILES.xml that was loaded implictly by running the application in the directory containing that file), they will not be included in that QoS.

Thank you!