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 56926 - API change: StartServer.isSuspended() method added
Summary: API change: StartServer.isSuspended() method added
Status: RESOLVED INVALID
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: apireviews
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 54291
  Show dependency tree
 
Reported: 2005-03-24 13:02 UTC by Libor Kotouc
Modified: 2005-03-29 08:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
j2eeserver.diff (1.25 KB, patch)
2005-03-24 13:59 UTC, Sherold Dev
Details | Diff
J2EEServerAPI.zip (332.15 KB, application/octet-stream)
2005-03-24 14:00 UTC, Sherold Dev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Libor Kotouc 2005-03-24 13:02:48 UTC
Issue #54291 requires disallowing user to start server when it is in suspended
mode, i.e. debugger is connected and waiting on breakpoint.
We are now unable to implement it on j2eeserver level because retrieving debug
info from AS8.1 requires non-null target for getDebugInfo() method.
We'd like to be able to get server state on the plugin level, thus adding
isDebuggable() method to the StartServer class. This method is analogical to
isRunning() method added earlier.
Comment 1 Libor Kotouc 2005-03-24 13:04:38 UTC
StartServer's code:

    /**
     * Returns true if this admin server is suspended.
     */
    public abstract boolean isSuspended();
    
    /**
     * Returns true if given target is suspended. This should be
     * overwritten by plugins which support multiple target servers via
     * one admin server.
     * @param target the target server in question; null value implies 
     * the query is against the admin server.
     * @return true if the server is question is running.
     * @since 1.6
     */
    public boolean isSuspended(Target target) {
        if (target == null || isAlsoTargetServer(target)) {
            return isSuspended();
        }
        
        return false;
    }
Comment 2 Libor Kotouc 2005-03-24 13:05:15 UTC
        <change id="StartServer-isSuspended">
            <api name="plugins"/>
            <summary>StartServer methods for SUSPENDED state detection.</summary>
            <version major="1" minor="6"/>
            <date day="24" month="3" year="2005"/>
            <author login="lkotouc"/>
            <compatibility binary="compatible" source="compatible"
semantic="compatible" addition="yes"/>
            <description>
                <p>
                    J2eeserver has to be able to detect server in suspended
state to disallow user
                    to start server again.
                    Methods isRunning and isRunning(Target)are added as
StartServer abstract class plugin SPI.
                </p>
            </description>
            <class package="org.netbeans.modules.j2ee.deployment.plugins.api"
name="StartServer"/>
            <issue number="53010"/>
        </change>
Comment 3 Libor Kotouc 2005-03-24 13:10:53 UTC
apichanges.xml (version abonve is incorrect):

        <change id="StartServer-isSuspended">
            <api name="plugins"/>
            <summary>StartServer methods for SUSPENDED state detection.</summary>
            <version major="1" minor="6"/>
            <date day="24" month="3" year="2005"/>
            <author login="lkotouc"/>
            <compatibility binary="incompatible" source="incompatible"
semantic="incompatible" addition="yes"/>
            <description>
                <p>
                    J2eeserver has to be able to detect server in suspended
state to disallow user
                    to start server again.
                    Methods isSuspended and isSuspended(Target)are added as
StartServer abstract class plugin SPI.
                </p>
            </description>
            <class package="org.netbeans.modules.j2ee.deployment.plugins.api"
name="StartServer"/>
            <issue number="54291"/>
        </change>
Comment 4 Sherold Dev 2005-03-24 13:59:16 UTC
Created attachment 21101 [details]
j2eeserver.diff
Comment 5 Sherold Dev 2005-03-24 14:00:16 UTC
Created attachment 21102 [details]
J2EEServerAPI.zip
Comment 6 Sherold Dev 2005-03-24 14:09:32 UTC
Please review this api change.

Using the API_REVIEW_FAST keyword since the change is trivial, though incompatible.
Comment 7 Miloslav Metelka 2005-03-25 18:54:35 UTC
Just curious: I've seen that the API in
j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/api consists mainly
of interfaces and abstract classes. Do you plan to slit it into API and SPI
parts in the future so that the API part would just contain final classes
delegating to the SPI and the SPI would contain interfaces for implementations?
Comment 8 Libor Kotouc 2005-03-28 18:50:20 UTC
Intent reached by fixing issue #54291 - on j2eeserver level.
Comment 9 Sherold Dev 2005-03-29 08:00:53 UTC
This mixture of plugin API and SPI is a known problem which should be solved as
part of issue 50944 - "Split j2eeserver module into smaller parts".