Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » WST Server Runtime Preference setup in product setup
WST Server Runtime Preference setup in product setup [message #1764461] Tue, 30 May 2017 07:58 Go to next message
Anders Hammar is currently offline Anders HammarFriend
Messages: 12
Registered: August 2012
Junior Member
I'm trying to setup WST Server Runtime Preference as part of a product setup (not project setup). But it doesn't work.
In [1] it says how to do this as part of the project setup. Does it have to be that and can't be part of product setup?

What I have in my product setup is this:

      <setupTask
          xsi:type="setup:PreferenceTask"
          key="/instance/com.ibm.etools.aries.websphere.core.targets/WebSphere Application Server traditional V8.5"
          value="local:1495802359916.target;C:/Data/IBM/WebSphere/AppServer_V8_5"/>
      <setupTask
          xsi:type="setup:PreferenceTask"
          key="/instance/org.eclipse.wst.server.core/runtimes"
          value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?>&#xD;&#xA;&lt;runtimes>&#xD;&#xA;  &lt;runtime id=&quot;Web Preview Server Runtime&quot; id-set=&quot;true&quot; location=&quot;C:/Data/workspace-was855/.metadata/.plugins/com.ibm.etools.wdt.server.core/tmp0&quot; name=&quot;Web Preview Server Runtime&quot; runtime-type-id=&quot;com.ibm.etools.wdt.server.runtime.10&quot; timestamp=&quot;0&quot;/>&#xD;&#xA;  &lt;runtime current_SDK_Id=&quot;1.7.1_64&quot; id=&quot;WebSphere Application Server traditional V8.5&quot; location=&quot;C:/Data/IBM/WebSphere/AppServer_V8_5&quot; name=&quot;WebSphere Application Server traditional V8.5&quot; runtime-type-id=&quot;com.ibm.ws.ast.st.runtime.v85&quot; timestamp=&quot;0&quot;/>&#xD;&#xA;&lt;/runtimes>&#xD;&#xA;"/>


The strange thing is that in the Eclipse Updater output I only see one of these two being applied:
Quote:

Performing Preference /instance/com.ibm.etools.aries.websphere.core.targets/WebSphere Application Server traditional V8.5 = local:1495802359916.target;C:/Data/IBM/WebSphere/AppServer_V8_5


So, should this work in the product setup and if so, any idea what could be the problem?

I'm using oomph 1.7.0.

[1] https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Setting_up_WST_Server_Runtime_and_Instances_in_your_Project_Setup
Re: WST Server Runtime Preference setup in product setup [message #1764470 is a reply to message #1764461] Tue, 30 May 2017 10:45 Go to previous messageGo to next message
Anders Hammar is currently offline Anders HammarFriend
Messages: 12
Registered: August 2012
Junior Member
I found this thread with a similar issue:
https://www.eclipse.org/forums/index.php/t/1083832/

I guess the problem is that it's an xml clob and it isn't being applied as it already has an value. Is there any way to overrride this?
Re: WST Server Runtime Preference setup in product setup [message #1764485 is a reply to message #1764470] Tue, 30 May 2017 12:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Yes, XML blobs are a problem. We never replace an existing XML value with a new one. So such a thing only works if we implement a special preference handler for it. I recall looking at this a bit, but concluded that the representation was so poorly formed as to make merging a challenge...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: WST Server Runtime Preference setup in product setup [message #1764489 is a reply to message #1764485] Tue, 30 May 2017 13:18 Go to previous messageGo to next message
Anders Hammar is currently offline Anders HammarFriend
Messages: 12
Registered: August 2012
Junior Member
Ok. What hasn't been obvious to me is my other values are replaced but not xml values. Is there a reason for doing it differently? (I'm not talking about merging here but just simply replacing.)

If doing a pref import within Eclipse my understanding is that xml values are replaced by the imported prefs file value.
Re: WST Server Runtime Preference setup in product setup [message #1764497 is a reply to message #1764489] Tue, 30 May 2017 14:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
People complained that their server implementations were being overwritten. Looking at XML blobs, they often are to be collections of things, and the preference task should add to that collection, or replace one item in the collection. That's what the specialized handlers do; but they need to know combination of attributes uniquely identify each item in the collection...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: WST Server Runtime Preference setup in product setup [message #1764543 is a reply to message #1764497] Wed, 31 May 2017 07:02 Go to previous messageGo to next message
Anders Hammar is currently offline Anders HammarFriend
Messages: 12
Registered: August 2012
Junior Member
Ok, I see. I guess it makes sense. However, the different handling compared to doing a prefs import in Eclipse surprised me.

In this specific case, there is an 'id' attribute. Shouldn't it be possible to do the merging based on this?

Also, just for me to understand as I'm fairly new to oomph and am still struggling to understand the inner parts, these "specialized handlers" you're talking about do they exist already?
Re: WST Server Runtime Preference setup in product setup [message #1764556 is a reply to message #1764543] Wed, 31 May 2017 08:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Yes, perhaps it's possible to support this given the 'id' attribute should help identify the item. And yes, handlers such as org.eclipse.oomph.setup.impl.PreferenceTaskImpl.JDTProfileChoicePreferenceHandler exist to support managing JDT's clean and formatter profiles. Each case requires a significant investment of time to implement the handler... And the package maintainers for JEE just complained and then disabled the recorder by default because of this problem of replacing XML blobs, so my motivation to make things work better for that stuff is a bit stretched, along with my time...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: WST Server Runtime Preference setup in product setup [message #1764583 is a reply to message #1764556] Wed, 31 May 2017 13:22 Go to previous message
Anders Hammar is currently offline Anders HammarFriend
Messages: 12
Registered: August 2012
Junior Member
Thanks for your clarification!
I've finally managed to configure a WAS server as a WST Server via the WebsphereServerTask [1]. It seems to be a better path. (Your feedback in another thread was quickly implemented by the task author.)

[1] https://github.com/gratex/oomph-task-server
Previous Topic:OOmph offline installation failing
Next Topic:How do I sync existing preferences?
Goto Forum:
  


Current Time: Tue Apr 23 09:06:51 GMT 2024

Powered by FUDForum. Page generated in 0.04011 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top