This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 223442 - use Util.isAtLeastJavaEE6Web to improve commit 5f3180f5cf11
Summary: use Util.isAtLeastJavaEE6Web to improve commit 5f3180f5cf11
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on: 223317
Blocks:
  Show dependency tree
 
Reported: 2012-12-06 20:36 UTC by David Konecny
Modified: 2013-01-15 14:29 UTC (History)
3 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
patch (17.04 KB, patch)
2012-12-09 20:37 UTC, David Konecny
Details | Diff
patch (35.00 KB, patch)
2012-12-09 20:55 UTC, David Konecny
Details | Diff
patch (28.05 KB, patch)
2012-12-09 21:08 UTC, David Konecny
Details | Diff
separate patch for J2eeProjectCapabilities (4.35 KB, patch)
2012-12-10 19:29 UTC, David Konecny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2012-12-06 20:36:32 UTC
Use new API introduced in the issue 223317 to improve http://hg.netbeans.org/web-main/rev/5f3180f5cf11 change.
Comment 1 David Konecny 2012-12-09 20:37:37 UTC
Created attachment 129116 [details]
patch
Comment 2 David Konecny 2012-12-09 20:55:24 UTC
Created attachment 129117 [details]
patch
Comment 3 David Konecny 2012-12-09 20:56:54 UTC
CCing Martin as I'm changing EJB core module.
Comment 4 David Konecny 2012-12-09 21:08:31 UTC
Created attachment 129119 [details]
patch
Comment 5 Martin Fousek 2012-12-10 07:02:06 UTC
Thanks David for CCing and doing code clean-up. In any case I raised new task #223573 to redesign EJBsupport to be able to prune J2eeProjectCapabilities class so I'll take a look on this code base once again during NB74 developing phase.

Only one comment:
[MF01] Logic of 
- EjbFacadeVisualPanel2
- SessionEJBWizardPanel
- WebProject 
looks changed to me, it doesn't catch server requirements any more. Please keep the "serverSupportsEJB31" related code for now - In the future I'll replace it with something like EJBSupport#isEjb31CapableServer (at least in the EJB cases).

Thanks again...
Comment 6 David Konecny 2012-12-10 19:28:48 UTC
(In reply to comment #5)
> #223573 to redesign EJBsupport

ok

> [MF01] Logic [...] doesn't catch server requirements any more

I see. I overlooked that server profiles are checked *separately*. Which does not make sense, no? Calling for example

  J2eeProjectCapabilities.forProject(project).isEjb31Supported()

should return true if all conditions for EJB 31 development in given project are satisfied and that includes also checking server associated with project. I'm attaching a patch which address this part of the problem. I have not tested any of the patches in this issue.
Comment 7 David Konecny 2012-12-10 19:29:23 UTC
Created attachment 129176 [details]
separate patch for J2eeProjectCapabilities
Comment 8 Martin Fousek 2012-12-11 08:36:14 UTC
(In reply to comment #6)
> > [MF01] Logic [...] doesn't catch server requirements any more
> 
> I see. I overlooked that server profiles are checked *separately*. Which does
> not make sense, no?

Actually I think that it makes pretty well sense in the context where is J2eePC.isEjb31Supported() used. I.e. it distinguishes which file templates are recommended in the web/maven web projects. We *don't want* to base it on the chosen server instance.
 
> Calling for example
>
>   J2eeProjectCapabilities.forProject(project).isEjb31Supported()
> 
> should return true if all conditions for EJB 31 development in given project
> are satisfied and that includes also checking server associated with project.

BTW, also we should keep in mind that Maven EE projects still be used w/out server instance, so it means that many wizards and recommended templates would stop working for them as well.

> I'm attaching a patch which address this part of the problem. I have not tested
> any of the patches in this issue.

I'm pretty sure, that the EJBsupport will behave in the similar way you tried out to do in the J2eeProjectCapabilities, but the second patch doesn't look well to me at all, sorry. I propose to stay only with the first patch (fixed for the server capabilities). I'm going to rewrite all EJB usages of the J2eeProjectCapabilities and I don't want to bring any regression caused by quick fixes there.