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 53010 - Additional SPI methods on StartServer for target server state manament
Summary: Additional SPI methods on StartServer for target server state manament
Status: CLOSED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2005-01-05 20:00 UTC by Nam Nguyen
Modified: 2006-03-24 13:09 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
apichanges and code diffs (15.40 KB, patch)
2005-01-10 14:05 UTC, Nam Nguyen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nam Nguyen 2005-01-05 20:00:01 UTC
Removal dependency on JSR-77 also remove
capability to ping/start/stop target server
instances that are distinct from the admin server
instance (DeploymentManager).

To replace it, we need the following optional
methods on
o.n.m.j2ee.deployment.plugins.api.StartServer:

/**
 * Returns the running state of a specific target.
 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.
 */
public isRunning(Target target) {
  if (target == null || isAlsoTargetServer(target)) {
    return isRunning();
  }

  return false;
}

/**
 * Returns if the plugin can start/stop single
target servers.
 * This should be overwritten as needed.
 * @param target the target server in question,
could be null in which
 * case the answer should probably be false.
 * @return true if this plugin can currently
handle state management for the specific target.
 */
public boolean supportsStartTarget(Target target) {
  return false;
}

/**
 * Starts the target server asynchronously and
reports the status
 * through the returned
<code>ProgressObject</code>. This should be
 * overwritten by plugins which support the state
management of
 * different target servers.
 * @param target a non-null target server to be
started
 * @return a ProgressObject which is used to
communicate the
 * progess/state of this action.  Should not be
null when supportsStartTarget returns true on same
target.
 */
public ProgressObject startTarget(Target target) {
  return null;
}

/**
 * Stops the target server asynchronously and
reports the status
 * through the returned
<code>ProgressObject</code>. This should be
 * overwritten by plugins which support the state
management of
 * different target servers.
 * @param target a non-null target server to be
stopped
 * @return a ProgressObject which is used to
communicate the
 * progess/state of this action.  Should not be
null when supportsStartTarget return true on the
same target.
 */
public ProgressObject stopTarget(Target target) {
  return null;
}
Comment 1 Marco Walther 2005-01-05 21:51:38 UTC
Should work for me.

Thanks,
-- Marco
Comment 2 Martin Grebac 2005-01-10 08:58:58 UTC
I don't understand what this bug is about. What needs to be done here?
Comment 3 Nam Nguyen 2005-01-10 13:31:51 UTC
This bug is for api reviews process.  Since nobody on the cclist has
further comment, I assign this to apireviews.

This api changes is compatible and trivial.  Basically, resurrect the
old start target server support implemenation with service methods now
comes from StartServer instead of JSR-77 and JMX.
Comment 4 Nam Nguyen 2005-01-10 14:05:16 UTC
Created attachment 19578 [details]
apichanges and code diffs
Comment 5 Nam Nguyen 2005-01-12 09:05:15 UTC
There is no feedback from apireviews.  Should I assume this is OK to
proceed with checkin?
Comment 6 Nam Nguyen 2005-01-12 19:31:40 UTC
Added tag @since as recommended.
The module spec version number has already been incremented twice for
this release.  I believe we only need to increment once per release.

Checking in apichanges.xml;
/cvs/j2eeserver/apichanges.xml,v  <--  apichanges.xml
new revision: 1.7; previous revision: 1.6
done
Processing log script arguments...
More commits to come...
Checking in
src/org/netbeans/modules/j2ee/deployment/config/DDFilesListener.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/config/DDFilesListener.java,v
 <--  DDFilesListener.java
new revision: 1.3; previous revision: 1.2
done
Processing log script arguments...
More commits to come...
Checking in
src/org/netbeans/modules/j2ee/deployment/impl/Bundle.properties;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.29; previous revision: 1.28
done
Checking in
src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java,v
 <--  ServerInstance.java
new revision: 1.40; previous revision: 1.39
done
Checking in
src/org/netbeans/modules/j2ee/deployment/impl/ServerTarget.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerTarget.java,v
 <--  ServerTarget.java
new revision: 1.12; previous revision: 1.11
done
Processing log script arguments...
More commits to come...
Checking in
src/org/netbeans/modules/j2ee/deployment/plugins/api/StartServer.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/api/StartServer.java,v
 <--  StartServer.java
new revision: 1.5; previous revision: 1.4
Comment 7 Nam Nguyen 2005-01-18 07:57:20 UTC
Checked in specified changes.
Comment 8 zikmund 2005-03-31 18:50:06 UTC
v