[JBoss JIRA] (JBIDE-26304) File Eclipse bugzilla reporting J2EEDeployableFactory module cache bug
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-26304?page=com.atlassian.jira.plugi... ]
Andre Dietisheim closed JBIDE-26304.
------------------------------------
Resolution: Done
> File Eclipse bugzilla reporting J2EEDeployableFactory module cache bug
> ----------------------------------------------------------------------
>
> Key: JBIDE-26304
> URL: https://issues.jboss.org/browse/JBIDE-26304
> Project: Tools (JBoss Tools)
> Issue Type: Task
> Components: openshift
> Affects Versions: 4.9.0.AM3
> Reporter: Andre Dietisheim
> Assignee: Andre Dietisheim
> Fix For: 4.9.0.AM3
>
> Attachments: maven-moduletest.zip
>
>
> JBIDE-22138 reported that the OpenShift Server adapter does not respect the "openshift" maven profile of a project.
> While implementing it we discovered that *J2EEDeployableFactory* is not clearing it's module cache when the *deploy-name* in *.settings/org.eclipse.wst.common.component* is changed.
> We need to file an Eclipse bug that reports this an create a PR for it (see *Fix* further down)
> h2. Steps:
> I have recorded the following screencast: https://www.youtube.com/watch?v=V_SdtXYkJHA&feature=youtu.be
> # EXEC: create a server adapter Basic/J2EE Preview
> # EXEC: import maven-moduletest as maven project into your workspace
> # EXEC: in Servers view, ctx menu for J2EE Preview: choose "Add and Remove..." and check the name of the available module maven-moduletest -> it's called maven-moduletest
> # EXEC: in Project Explorer, ctx-menu for maven-moduletest: pick Maven > Select Maven Profiles... & check the "openshift" profile
> # EXEC: in Servers view, ctx menu for J2EE Preview: choose "Add and Remove..." and check the name of the available module maven-moduletest
> Result:
> the available module os called *maven-moduletest* but it should be called *maven-moduletest(ROOT)* - the "openshift" maven profile overrides the <warName> property to ROOT which should set the deploy name, which it doesn't
> with the fix applied (pasted above in Comment 1) the module is correctly called maven-moduletest(ROOT) (step 5).
> h2. Fix:
> To fix this bad behaviour one has to change *J2EEDeployableFactory* in the following way:
> {code:title=org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory}
> protected void cleanAllDelegates() {
> Iterator<FlatComponentDeployable> i = moduleDelegates.values().iterator();
> while(i.hasNext()) {
> i.next().clearCache();
> }
> + clearModuleCache();
> modulesChanged();
> }
> + @Override
> + public void clearModuleCache() {
> + clearCache(null);
> + }
> {code}
> ps. notice the oddness in terms of API:
> {code}protected void clearCache(IProject project){code} has a parameter *IProject* but it's not being used in this class, nor in the super classes.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 9 months
[JBoss JIRA] (JBIDE-26304) File Eclipse bugzilla reporting J2EEDeployableFactory module cache bug
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-26304?page=com.atlassian.jira.plugi... ]
Andre Dietisheim updated JBIDE-26304:
-------------------------------------
Description:
JBIDE-22138 reported that the OpenShift Server adapter does not respect the "openshift" maven profile of a project.
While implementing it we discovered that *J2EEDeployableFactory* is not clearing it's module cache when the *deploy-name* in *.settings/org.eclipse.wst.common.component* is changed.
We need to file an Eclipse bug that reports this an create a PR for it (see *Fix* further down)
h2. Steps:
I have recorded the following screencast: https://www.youtube.com/watch?v=V_SdtXYkJHA&feature=youtu.be
# EXEC: create a server adapter Basic/J2EE Preview
# EXEC: import maven-moduletest as maven project into your workspace
# EXEC: in Servers view, ctx menu for J2EE Preview: choose "Add and Remove..." and check the name of the available module maven-moduletest -> it's called maven-moduletest
# EXEC: in Project Explorer, ctx-menu for maven-moduletest: pick Maven > Select Maven Profiles... & check the "openshift" profile
# EXEC: in Servers view, ctx menu for J2EE Preview: choose "Add and Remove..." and check the name of the available module maven-moduletest
Result:
the available module os called *maven-moduletest* but it should be called *maven-moduletest(ROOT)* - the "openshift" maven profile overrides the <warName> property to ROOT which should set the deploy name, which it doesn't
with the fix applied (pasted above in Comment 1) the module is correctly called maven-moduletest(ROOT) (step 5).
h2. Fix:
To fix this bad behaviour one has to change *J2EEDeployableFactory* in the following way:
{code:title=org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory}
protected void cleanAllDelegates() {
Iterator<FlatComponentDeployable> i = moduleDelegates.values().iterator();
while(i.hasNext()) {
i.next().clearCache();
}
+ clearModuleCache();
modulesChanged();
}
+ @Override
+ public void clearModuleCache() {
+ clearCache(null);
+ }
{code}
ps. notice the oddness in terms of API:
{code}protected void clearCache(IProject project){code} has a parameter *IProject* but it's not being used in this class, nor in the super classes.
was:
JBIDE-22138 reported that the OpenShift Server adapter does not respect the "openshift" maven profile of a project.
While implementing it we discovered that *J2EEDeployableFactory* is not clearing it's module cache when the *deploy-name* in *.settings/org.eclipse.wst.common.component* is changed.
We need to file an Eclipse bug that reports this an create a PR for it (see *Fix* further down)
h2. Steps:
I have recorded the following screencast: https://www.youtube.com/watch?v=V_SdtXYkJHA&feature=youtu.be
The following steps assume a change in maven profile which leads to a change in the deploy-name. The same can be achieved by simply editing *.settings/org.eclipse.wst.common.component* in an Eclipse editor, leaving maven aside.
# ASSERT: I have a maven project "hello" where switching the profile switches the deployment name from *hello.war* (no profile selected) to *ROOT.war* (profile "openshift" selected).
# ASSERT: Initially I have
{code:title=<workspace>hello/.settings/org.eclipse.wst.common.component}
deploy-name="hello"
{code}.
# ASSERT: Looking at the configured modules for my server adapter I see the module being called *hello*.
# EXEC: I go project preferences > Maven and choose the "openshift" profile
# ASSERT: I see component settings being updated on disk.
{code:title=<workspace>hello/.settings/org.eclipse.wst.common.component}
deploy-name="ROOT"
{code}.
# RESULT: the configured module for my OpenShift server adapter is still called *hello*.
# ASSERT: the configured module for my OpenShift server adapter should be called *hello(ROOT)*.
# EXEC: If I now go to some project property which updates the maven config (ex. Web Content Settings) and hit "Apply and Close"
# RESULT: The available modules for my OpenShift Server adapter are updated, the configured module is now updated and called *hello(ROOT)*
h2. Fix:
To fix this bad behaviour one has to change *J2EEDeployableFactory* in the following way:
{code:title=org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory}
protected void cleanAllDelegates() {
Iterator<FlatComponentDeployable> i = moduleDelegates.values().iterator();
while(i.hasNext()) {
i.next().clearCache();
}
+ clearModuleCache();
modulesChanged();
}
+ @Override
+ public void clearModuleCache() {
+ clearCache(null);
+ }
{code}
ps. notice the oddness in terms of API:
{code}protected void clearCache(IProject project){code} has a parameter *IProject* but it's not being used in this class, nor in the super classes.
> File Eclipse bugzilla reporting J2EEDeployableFactory module cache bug
> ----------------------------------------------------------------------
>
> Key: JBIDE-26304
> URL: https://issues.jboss.org/browse/JBIDE-26304
> Project: Tools (JBoss Tools)
> Issue Type: Task
> Components: openshift
> Affects Versions: 4.9.0.AM3
> Reporter: Andre Dietisheim
> Assignee: Andre Dietisheim
> Fix For: 4.9.0.AM3
>
> Attachments: maven-moduletest.zip
>
>
> JBIDE-22138 reported that the OpenShift Server adapter does not respect the "openshift" maven profile of a project.
> While implementing it we discovered that *J2EEDeployableFactory* is not clearing it's module cache when the *deploy-name* in *.settings/org.eclipse.wst.common.component* is changed.
> We need to file an Eclipse bug that reports this an create a PR for it (see *Fix* further down)
> h2. Steps:
> I have recorded the following screencast: https://www.youtube.com/watch?v=V_SdtXYkJHA&feature=youtu.be
> # EXEC: create a server adapter Basic/J2EE Preview
> # EXEC: import maven-moduletest as maven project into your workspace
> # EXEC: in Servers view, ctx menu for J2EE Preview: choose "Add and Remove..." and check the name of the available module maven-moduletest -> it's called maven-moduletest
> # EXEC: in Project Explorer, ctx-menu for maven-moduletest: pick Maven > Select Maven Profiles... & check the "openshift" profile
> # EXEC: in Servers view, ctx menu for J2EE Preview: choose "Add and Remove..." and check the name of the available module maven-moduletest
> Result:
> the available module os called *maven-moduletest* but it should be called *maven-moduletest(ROOT)* - the "openshift" maven profile overrides the <warName> property to ROOT which should set the deploy name, which it doesn't
> with the fix applied (pasted above in Comment 1) the module is correctly called maven-moduletest(ROOT) (step 5).
> h2. Fix:
> To fix this bad behaviour one has to change *J2EEDeployableFactory* in the following way:
> {code:title=org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory}
> protected void cleanAllDelegates() {
> Iterator<FlatComponentDeployable> i = moduleDelegates.values().iterator();
> while(i.hasNext()) {
> i.next().clearCache();
> }
> + clearModuleCache();
> modulesChanged();
> }
> + @Override
> + public void clearModuleCache() {
> + clearCache(null);
> + }
> {code}
> ps. notice the oddness in terms of API:
> {code}protected void clearCache(IProject project){code} has a parameter *IProject* but it's not being used in this class, nor in the super classes.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 9 months
[JBoss JIRA] (JBIDE-26304) File Eclipse bugzilla reporting J2EEDeployableFactory module cache bug
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-26304?page=com.atlassian.jira.plugi... ]
Andre Dietisheim updated JBIDE-26304:
-------------------------------------
Attachment: maven-moduletest.zip
> File Eclipse bugzilla reporting J2EEDeployableFactory module cache bug
> ----------------------------------------------------------------------
>
> Key: JBIDE-26304
> URL: https://issues.jboss.org/browse/JBIDE-26304
> Project: Tools (JBoss Tools)
> Issue Type: Task
> Components: openshift
> Affects Versions: 4.9.0.AM3
> Reporter: Andre Dietisheim
> Assignee: Andre Dietisheim
> Fix For: 4.9.0.AM3
>
> Attachments: maven-moduletest.zip
>
>
> JBIDE-22138 reported that the OpenShift Server adapter does not respect the "openshift" maven profile of a project.
> While implementing it we discovered that *J2EEDeployableFactory* is not clearing it's module cache when the *deploy-name* in *.settings/org.eclipse.wst.common.component* is changed.
> We need to file an Eclipse bug that reports this an create a PR for it (see *Fix* further down)
> h2. Steps:
> I have recorded the following screencast: https://www.youtube.com/watch?v=V_SdtXYkJHA&feature=youtu.be
> # EXEC: create a server adapter Basic/J2EE Preview
> # EXEC: import maven-moduletest as maven project into your workspace
> # EXEC: in Servers view, ctx menu for J2EE Preview: choose "Add and Remove..." and check the name of the available module maven-moduletest -> it's called maven-moduletest
> # EXEC: in Project Explorer, ctx-menu for maven-moduletest: pick Maven > Select Maven Profiles... & check the "openshift" profile
> # EXEC: in Servers view, ctx menu for J2EE Preview: choose "Add and Remove..." and check the name of the available module maven-moduletest
> Result:
> the available module os called *maven-moduletest* but it should be called *maven-moduletest(ROOT)* - the "openshift" maven profile overrides the <warName> property to ROOT which should set the deploy name, which it doesn't
> with the fix applied (pasted above in Comment 1) the module is correctly called maven-moduletest(ROOT) (step 5).
> h2. Fix:
> To fix this bad behaviour one has to change *J2EEDeployableFactory* in the following way:
> {code:title=org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory}
> protected void cleanAllDelegates() {
> Iterator<FlatComponentDeployable> i = moduleDelegates.values().iterator();
> while(i.hasNext()) {
> i.next().clearCache();
> }
> + clearModuleCache();
> modulesChanged();
> }
> + @Override
> + public void clearModuleCache() {
> + clearCache(null);
> + }
> {code}
> ps. notice the oddness in terms of API:
> {code}protected void clearCache(IProject project){code} has a parameter *IProject* but it's not being used in this class, nor in the super classes.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 9 months
[JBoss JIRA] (JBIDE-26257) createServer replies with OK when trying to create the same server twice
by Jan Richter (JIRA)
[ https://issues.jboss.org/browse/JBIDE-26257?page=com.atlassian.jira.plugi... ]
Jan Richter closed JBIDE-26257.
-------------------------------
Closing as done.
> createServer replies with OK when trying to create the same server twice
> ------------------------------------------------------------------------
>
> Key: JBIDE-26257
> URL: https://issues.jboss.org/browse/JBIDE-26257
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: runtime-server-protocol
> Reporter: Jan Richter
> Assignee: Rob Stryker
> Fix For: 4.9.0.AM1
>
>
> Having sent the server/createServer request twice with the same parameters - RSP created the server after the first request, but then responded with the following after the second request:
> {noformat}{ severity: 0, pluginId: 'unknown', code: 0, message: 'ok' }{noformat}
> Given that no second server was created (expected), there should be an error indicated in the status.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 9 months