Problem with context when using multiple instances of OxygenXML Author
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 2
- Joined: Fri Mar 18, 2022 3:49 pm
Problem with context when using multiple instances of OxygenXML Author
Post by koen_stynen »
Since our writers are working on multiple DITA maps at a time and want to have these DITA maps open on seperate screens, we use a '.bat' file with the -Dcom.oxygenxml.MultipleInstances=true option. These maps are often idenctical but we use conkeyrefs to load different keys.
We have for instance a 'keys' map within the map that contains 'topicref' references to different key-files ('product_info', 'manufacturer_info', ...). I think this is important to know because the different maps that are opened, use the same conkeyref values.
We noticed that after some time, the contexts of these different instances seem to get into eachothers way. When we use the 'DITA reusable components' module, we suddenly see keys appearing from the contexts of the other open Author instances. This is not always immediately the case but after a while, it almost always happens. So when we look for 'product_name' which is an element in the 'product_info' key file (conkeyref = product_info/product_name), we suddenly see two versions appear in the 'DITA reusable comonents'. One is correct and the other one is from the context of another open Author instance. It looks as if keys are being indexed from both contexts. Maybe a common cache or memory stack is being used or something for the contexts?
When you insert the component from the other instance (from the wrong context), it will be inserted as a 'conref' with a fixed path to the key.
When you insert the correct component from the active context of your instance, it will be inserted correctly as a 'conkeyref'.
So, the situation:
- Author instance 1: Map A opened with context A
- Author instance 2: Map B opened with context B
Note again that both maps use the same 'keys' map structure and therefore 'product_info/product_name' exists in both contexts.
We have for instance a 'keys' map within the map that contains 'topicref' references to different key-files ('product_info', 'manufacturer_info', ...). I think this is important to know because the different maps that are opened, use the same conkeyref values.
We noticed that after some time, the contexts of these different instances seem to get into eachothers way. When we use the 'DITA reusable components' module, we suddenly see keys appearing from the contexts of the other open Author instances. This is not always immediately the case but after a while, it almost always happens. So when we look for 'product_name' which is an element in the 'product_info' key file (conkeyref = product_info/product_name), we suddenly see two versions appear in the 'DITA reusable comonents'. One is correct and the other one is from the context of another open Author instance. It looks as if keys are being indexed from both contexts. Maybe a common cache or memory stack is being used or something for the contexts?
When you insert the component from the other instance (from the wrong context), it will be inserted as a 'conref' with a fixed path to the key.
When you insert the correct component from the active context of your instance, it will be inserted correctly as a 'conkeyref'.
So, the situation:
- Author instance 1: Map A opened with context A
- Author instance 2: Map B opened with context B
Note again that both maps use the same 'keys' map structure and therefore 'product_info/product_name' exists in both contexts.
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Problem with context when using multiple instances of OxygenXML Author
Hi,
In my opinion your writers could also try to create multiple Oxygen project files, one for each top level DITA Map and then use a single instance of Oxygen but change in the Project view between projects when working with one top level DITA Map and switching to another, this would avoid having Oxygen opened as an application multiple times.
When Oxygen is run with the multiple-instances flag, it's run in separate processes but these processes share a common user options folder "%APPDATA%com.oxygenxml" containing Oxygen common caching and setting files.
There are system properties which can be set in the oxygen.bat to state that a different options folder should be used:
https://www.oxygenxml.com/doc/versions/ ... gs_bgk_54b
Coming back to the "DITA Reusable Components" view, it has three tabs "Keys/Components/Media". I think the "Keys" and "Media" tabs should not have any problem but the problems you are reporting happen in the "Components" tab, is this correct? For the "Components" tab Oxygen uses some indexer caching files which get saved to the "com.oxygenxml" folder I mentioned above and they will be shared between instances. See for example the folder "com.oxygenxml/lucene" which stores indexing files based on the current project opened in the Oxygen application. So having multiple project files, one for each top level DITA Map might also help with this, even if you keep using this strategy with multiple opened Oxygen applications.
Regards,
Radu
In my opinion your writers could also try to create multiple Oxygen project files, one for each top level DITA Map and then use a single instance of Oxygen but change in the Project view between projects when working with one top level DITA Map and switching to another, this would avoid having Oxygen opened as an application multiple times.
When Oxygen is run with the multiple-instances flag, it's run in separate processes but these processes share a common user options folder "%APPDATA%com.oxygenxml" containing Oxygen common caching and setting files.
There are system properties which can be set in the oxygen.bat to state that a different options folder should be used:
https://www.oxygenxml.com/doc/versions/ ... gs_bgk_54b
Coming back to the "DITA Reusable Components" view, it has three tabs "Keys/Components/Media". I think the "Keys" and "Media" tabs should not have any problem but the problems you are reporting happen in the "Components" tab, is this correct? For the "Components" tab Oxygen uses some indexer caching files which get saved to the "com.oxygenxml" folder I mentioned above and they will be shared between instances. See for example the folder "com.oxygenxml/lucene" which stores indexing files based on the current project opened in the Oxygen application. So having multiple project files, one for each top level DITA Map might also help with this, even if you keep using this strategy with multiple opened Oxygen applications.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Fri Mar 18, 2022 3:49 pm
Re: Problem with context when using multiple instances of OxygenXML Author
Post by koen_stynen »
First of all, thanks for the very detailed explanation. I was only able to test some things recently, hence my late feedback.
The problem we have is that we are actually using an external CCMS to store our DITA files so we are not using 'Oxygen projects' but are rather just opening DITA maps from a 'Data Source Explorer'. I don't even know if it is possible to start a project from a 'Data Source Explorer' folder?
I will try the suggestion of altering the 'options folder' parameter at startup also to see whether that is the issue. That would mean they have several different *.bat files to start different instances, each with a separate options folder I guess... Not ideal, but if this fixes the issue, they will have to cope with it. Unless there is a way to work with projects of course.
Thanks for your amazing feedback again!
The problem we have is that we are actually using an external CCMS to store our DITA files so we are not using 'Oxygen projects' but are rather just opening DITA maps from a 'Data Source Explorer'. I don't even know if it is possible to start a project from a 'Data Source Explorer' folder?
I will try the suggestion of altering the 'options folder' parameter at startup also to see whether that is the issue. That would mean they have several different *.bat files to start different instances, each with a separate options folder I guess... Not ideal, but if this fixes the issue, they will have to cope with it. Unless there is a way to work with projects of course.
Thanks for your amazing feedback again!
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Problem with context when using multiple instances of OxygenXML Author
Hi,
About this question:
Regards,
Radu
About this question:
Oxygen's Project view allows opening only local project ".xpr" files. But maybe you can create two separate local project ".xpr" files and make sure each started Oxygen application has in the Project view loaded a different ".xpr" project so that Oxygen's indexing cache used for the "Components" tab is stored in separate folders for each started Oxygen application..I don't even know if it is possible to start a project from a 'Data Source Explorer' folder?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service