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 226703 - GlassFish4 Web Profile can be chosen by creating new EJB project
Summary: GlassFish4 Web Profile can be chosen by creating new EJB project
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.3
Hardware: All All
: P1 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-26 10:32 UTC by Martin Fousek
Modified: 2013-03-05 01:50 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fousek 2013-02-26 10:32:43 UTC
Product Version: NetBeans IDE Dev (Build 20130226-593688e8d236)
Java: 1.7.0_06; Java HotSpot(TM) 64-Bit Server VM 23.2-b09
Runtime: Java(TM) SE Runtime Environment 1.7.0_06-b24
System: Linux version 3.2.0-27-generic running on amd64; UTF-8; en_US (nb)

I think that it shouldn't be possible to choose GF4-web server when creating EJB project since it supports just EJBlite platform which is not enough for many of full EJB features we have. CCing for assurance David whether he agree or not.

As far as I saw the ProjectServerPanel asks every J2eePlatform for list of supported types (#getSupportedTypes()) and GF4-full as well as GF4-web return all types. Probably only the WEB should be returned?
Comment 1 David Konecny 2013-02-26 18:53:54 UTC
Yeap, GF4-web should not return FULL profile(s).
Comment 2 TomasKraus 2013-02-27 15:55:37 UTC
Unfortunately there is no 100% foolproof way to distinguish web profile from full profile installation in GlassFish. Old code was checking for modules/appclient-server-core.jar to enable full profile support.

I'll change Tooling SDK to follow old behaviour. But I may need to verify that this JAR will work for GlassFish 4 too.
Comment 3 David Konecny 2013-02-27 20:32:03 UTC
Detection based on presence of some specific jar file should work reliably for a particular version of GF.
Comment 4 TomasKraus 2013-02-28 15:28:29 UTC
GlassFish features configuration file was altered to allow distribution checks.
Checks are based on specific JAR files occurence in modules directory.

Content of javaee XML element was modified to look like:

    <javaee version="1.7">
        <profile version="1.3" type="full"/>
        <profile version="1.4" type="full"/>
        <profile version="1.5" type="full"/>
        <profile version="1.6" type="web"/>
        <profile version="1.6" type="full" check="full"/>
        <profile version="1.7" type="web"/>
        <profile version="1.7" type="full" check="full"/>
        <module type="war"/>
        <module type="car" check="full"/>
        <module type="ear" check="full"/>
        <module type="ejb" check="full"/>
        <module type="rar" check="full"/>
        <check name="full">
            <file path="appclient-server-core.jar"/>
        </check>
    </javaee>

Now it's possible to define named check to verify JAR files occurence in
modules directory and make returned profiles and modules sets elements
dependent on check result for given GlassFish server home.
Comment 5 TomasKraus 2013-02-28 15:35:25 UTC
RFE 4725 - Distinguish GlassFish web profile distribution from full profile was created in GlassFish Tooling Library java.net project.

I have fix ready for 7.3.1 branch, I still have to forward-port it into trunk for 8.0.
Comment 6 TomasKraus 2013-02-28 16:01:21 UTC
Forward porting done.

Checked into web-main:
----------------------
changeset:   246834:915ea44ad6a7
branch:      javaee7
summary:     #226703 - GlassFish4 Web Profile can be chosen
             by creating new EJB project

I have to do some more testing before pushing this.
Comment 7 TomasKraus 2013-03-01 15:42:12 UTC
Checked into web-main:
----------------------
changeset:   246835:23307c2aba7b
branch:      javaee7
summary:     #226703 - GlassFish4 Web Profile can be chosen by creating
             new EJB project

There was one more issue in ConfigBuilder mapping. It seems to be fine now, pushing all the changes.
Comment 8 TomasKraus 2013-03-01 15:43:35 UTC
Also this is not a P3 bug. Raising to P1 and adding NO73 where old V3 code is still used.
Comment 9 Quality Engineering 2013-03-05 01:50:51 UTC
Integrated into 'main-golden', will be available in build *201303042300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/915ea44ad6a7
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #226703 - GlassFish4 Web Profile can be chosen by creating new EJB project