This document lists changes made to the J2EE Server API.
Fuller descriptions of all changes can be found below (follow links).
Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.
These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.j2eeserver/3 > 1.20
SourceFileMap; made by: nnguyen
Expand usage of
SourceFileMap by a set of methods
to allow plugin access source, descriptor files. Also added
static lookup methods to locate the right
See Javadoc for details.
ServerInstance; made by: phejl; issues: #202587
Provides additional methods to query for support for debugging and profiling.
Deployment; made by: phejl; issues: #234194
Additional Callable parameter allows execution of custom code just before the actual deployment.
ResourceChangeReporterImplementation; made by: phejl; issues: #175539
Added API/SPI to check for changes in resources deployed to server. Such changes are flagged in DeploymentChangeDescriptor and delivered to server plugin.
J2eeModuleProvider; made by: mkleint; issues: #165045
DeployOnSaveClassInterceptor class added + gettter in J2eeModuleProvider. to allow processing Artifact instances coming from java infrastructure.
Deployment; made by: phejl; issues: #83122
Provides a way to programmatic undeploy of the deployed app (project represented by J2eeModuleProvider).
J2eeModuleProvider; made by: nnguyen
Added methods on
J2eeModuleProvider for dev modules to
expose some its project directory structure part to
integration plugin. The added methods are:
Added methods on
J2eeModuleProvider.ConfigSupport for dev
modules to push configuration data to plugin or request
plugin to ensure resources are defined on creation of
EJBs. The added methods are:
setCMPMappingInfo(String ejbname, OriginalCMPMapping
ensureResourceDefinedForEjb(String ejbname, String
See Javadoc for details.
CommonServerBridge; made by: phejl
Added CommonServerBridge utility class to provide mapping of instance url to common api server instance.
InstanceProperties; made by: dkonecny
Adds helper method to create server instance which is not persistent.
DeploymentDescriptorConfiguration; made by: phejl; issues: #189012
The SPI interface DeploymentDescriptorConfiguration may be implemented by the server plugin in order to indicate the server needs deployment descriptor.
InstanceProperties; made by: phejl; issues: #83934
In the past, before the J2EE support was added to NetBeans the default server concept had been used. This concept was then abandoned since it did not work anymore. The problem could occur for example if the default server was Tomcat then the EJB project which was set to use the default server could not be deployed to it, etc.
InstanceProperties; made by: phejl
Method provides a way to remove server instance for plugins which don't use the j2eeserver UI.
OptionalDeploymentManagerFactory; made by: phejl; issues: #126010
OptionalDeploymentManagerFactory declares whether j2eeserver should provide common UI (like wizard for example). This should be done with Common Server API for every new plugin. InstantiatingIterator from OptionalDeploymentManagerFactory will serve only to j2eeserver specific purposes if isCommonUIRequired will return the false (the true is the default).
InstanceProperties; made by: phejl; issues: #122885
Provides a way how can plugin register instance to j2eeserver without any UI. SPI provided by Common Server should be used for UI integration.
InstanceProperties; made by: phejl; issues: #120379
The InstanceProperties.createInstanceProperties(String, String, String, String) method does not provide any way how to pass other initial properties required by the plugin. This is usually needed and workarounded in many plugins. New method provides additional parameter containing the any plugin required properties.
J2eeModuleProvider; made by: sherold; issues: #108198
The J2eeModuleProvider.bindEjbReference and J2eeModuleProvider.bindEjbReferenceForEjb methods need to pass an EJB JNDI name instead of EJB name to the plugin. The new J2eeModuleProvider.findJndiNameForEjb method will allow to obtain the EJB JNDI name.
Deployment; made by: sherold; issues: #113023
Adding a method which will tell whether the given server is running or not.
EjbResourceConfiguration; made by: sherold; issues: #108198
The EjbResourceConfiguration.bindEjbReference and EjbResourceConfiguration.bindEjbReferenceForEjb methods need to pass an EJB JNDI name instead of EJB name to the plugin. The new EjbResourceConfiguration.findJndiNameForEjb method will allow to obtain the EJB JNDI name.
MappingConfiguration; made by: sherold; issues: #99217
Removing J2eeModuleProvider.ConfigSupport.ensureResourceDefinedForEjb and EjbResourceConfiguration.ensureResourceDefined methods and replacing them with J2eeModuleProvider.ConfigSupport.setCMPResource and MappingConfiguration.setCMPResource.
The main reason for this change is that the ComponentInterface parameter can no longer be used since the metadata model was introduced, other reason is that the old name was confusing.
J2eeModuleImplementation; made by: sherold; issues: #99217
Renaming J2eeModule's and J2eeModuleImplementation's getDeploymentDescriptor method to getMetadataModel.
ServerManager; made by: sherold; issues: #105403
Adds a method for displaying the Add server instance wizard.
Deployment; made by: vkraemer; issues: #89439
Expose the directory deployment capabilities that a target server may have which would allow the build script for a project to be optimized to delay or eliminate unnecessary steps
EjbResourceConfiguration; made by: lkotouc; issues: #89439
API for Call EJB action.
MessageDestinationConfiguration; made by: lkotouc; issues: #89439
API for working with data sources, message-driven beans and JMS messages.
OptionalDeploymentManagerFactory; made by: sherold; issues: #89439
API for JDBC driver deployment.
ModuleConfiguration; made by: sherold; issues: #99217
The initial motivation for the J2EE Server API changes is migration to Retouche, a new NetBeans Java infrastructure. The new Java infrastructure does not supply the old deployment descriptor model with fine-grained change notification events anymore and thus a new Merged deployment descriptor model infrastructure was created instead.
Since the architecture of the new Merged deployment descriptor model is essentially different from the old deployment descriptor model infrastructure, the model can no longer be wrapped in the JSR-88 DDBean wrapper, which was a basis of all the server specific deployment configuration APIs, the deployment configuration related part of the J2EE Server API had to be redesigned.
Because the redesign already introduced big incompatible changes, we took advantage of it to fix couple of API issues, which required incompatible changes. First, the server plug-in part of the API was split into API and SPI. So far, there was no clear distinction between API and SPI and it was not obvious what a server plug-in writer is required to implement. Second, throws ConfigurationException clause was added to all the server-specific configuration related methods to inform the client about a problem which might have occurred when reading or writing to server-specific configuration files.
For further description refer to the issue.
org.netbeans.modules.j2ee.deployment.plugins.api.ConfigurationSupport; made by: lkotouc; issues: #82476
Plugin needs to know JNDI name of the resource which the resource being defined is coming from.
org.netbeans.modules.j2ee.deployment.plugins.api.OptionalDeploymentManagerFactory; made by: sherold
Ant deployment support allows to generate Ant deployment build scripts that can be used to deploy j2ee modules to the server. The generated deployment build script can run in a headless mode - without the IDE. The IDE does not even have to be installed.
org.netbeans.modules.j2ee.deployment.plugins.api.J2eePlatformImpl; made by: pbuzek
Some for servers support different versions of j2ee for different modules. For example JBoss 4.0.3 supports EJB 3.0 in ejb module, but only servlet api 2.4 in web module.
org.netbeans.modules.j2ee.deployment.plugins.api.J2eePlatformImpl; made by: sherold
Many tools need properties like main class or JVM options, the getToolProperty method allows to get those properties now, so far these properties had to be hardcoded.
The constats for the tools and the tool properties were added to avoid problems that might occur if the tool string changes.
org.netbeans.modules.j2ee.deployment.plugins.api.OptionalDeploymentManagerFactory; made by: lkotouc
DS management API allows clients to access and manipulate the data sources. Data sources are created in the module and deployed when the module deployment begins. Data sources are accessed at two places - at the modules where they are stored after creation and on the module's target server.
org.netbeans.modules.j2ee.deployment.plugins.api.ConfigurationSupport; made by: sherold
Plugins need to be notified when the module enterprise resource directory changes.
Property PROP_ENTERPRISE_RESOURCE_DIRECTORY and property change listener added to J2eeModuleProvider.
Abstract method updateResourceDir(DeploymentConfiguration config, File resourceDir) added to ConfigurationSupport.
org.netbeans.modules.j2ee.deployment.profiler.spi.Profiler; made by: sherold; issues: #56032
Profiler support extension of the j2eeserver API allows Profiler to profile Web and other J2EE project types in a comfortable and reliable way.
Profiler SPI, the Profiler is required to implement and register into the default Lookup, allows to obtain information about current profiling session status, settings required for starting a server in profiling mode and to stop profiled server.
Profiler API, which defines class encapsulating settings required for starting a server in profiling mode and provides support for reading current state of Profiler registered in the default Lookup.
Extension of StartServer that allows the j2eeserver to check whether the given server supports profiling and allows to start it if it does.
Extension of J2eePlatform that allows the Profiler to check if the Java platform specified for the server is acceptable for profiling. If not, the Profiler is able to check if other platform which can be used for profiling is acceptable for running the server.
Ant task 'nbstartprofiledserver' that may stop other server being profiled and prepare the target server for profiling - this means (re)starting the server using provided settings or no action if the server is already running with correct configuration.
org.netbeans.modules.j2ee.deployment.plugins.api.ConfigurationSupport; made by: sherold; issues: #56032
The common server specific deployment descriptor data loader has been removed. Each plugin should now register its own data loader, if needed. The j2eeserver does no longer control saving of the server specific deployment descriptors, it is plugin responsibility now. With the removal of the common data loader, the plugins are no longer required to use the DConfigBean based model.
Plugins should implement the ConfigurationSupport abstract class in order to provide support for their server specific deployment descriptors.
Removed: DConfigBeanProperties, DConfigBeanUIFactory, DeploymentPlanSplitter. Modified: ConfigurationSupport interface was modified and turned into an abstract class.
org.netbeans.modules.j2ee.deployment.plugins.api.StartServer; made by: sherold; issues: #55640
ServerManager class allows other modules to display the Server Manager dialog.
UISupport class provides server plugins with an InputOutput instance with
the server state management actions: start, debug, restart, stop and refresh.
supportsStartDebugging() method says whether the
method is supported, it is analogous to the
J2eeModuleProvider; made by: pbuzek
Add a constant for J2EE 1.5 specification level.
J2eeModuleProvider; made by: sherold
When adding module to j2ee application the target server needs to be set to the same as for the app. To make this possible we need to add setServerInstanceID method into J2eeModuleProvider.
org.netbeans.modules.j2ee.deployment.plugins.api.StartServer; made by: pbuzek
These methods allow plugins to stop the server silently when the IDE is being shutdown. This addresses the problem filed as 52978 - Shutdown of appserver at IDE shutdown is unresponsive.
Deployment; made by: sherold
removeInstanceListener methods to the
Deployment class. This will allow registration of
that will listen to server instances changes (addition, removal, etc.) also for modules that do
not implement the
J2eeModuleProvider which was currently the only place where
InstanceListeners could be registered.
J2eeModuleProvider; made by: sherold
InstanceListener that will allow listening to server instance changes (addition,
removal, etc.). Methods for
InstanceListener registration were added to
Deployment class were added
getServerInstanceIDs methods for listing
registered server instances based on some requirements - supported module types, J2EE specification
versions and tools.
org.netbeans.modules.j2ee.deployment.plugins.api.J2eePlatformImpl; made by: abadea; issues: #52993
Added methods for the J2EE Platform to be able to specify an icon. The new methods are
org.netbeans.modules.j2ee.deployment.devmodules.spi.OriginalMappingProvider; made by: nnguyen
Related CMP Beans Wizard need to push mapping info to plugin in one single call. This would improve performance and make it easier for plugin code to process the relationship mappings. Part of this batching change, OriginalCMPMapping now includes ejbName. J2eeModuleProvider.ConfigSupport now has new method saveConfiguration() to allow development module wizard to commit changes it caused to component deployment configuration. OriginalMappingProvider, not used in the CMP mapping push module, is removed.
org.netbeans.modules.j2ee.deployment.plugins.api.J2eePlatformImpl; made by: sherold; issues: #52167
J2EE Platform extends the current j2eeserver module of description of a target environment J2EE applications are build against and subsequently deployed to.
Constants for the J2EE specification version added to the
Deployment class was added method
J2eePlatform instance for the given
Added new classes:
ModuleConfigurationFactory2; made by: phejl; issues: #193255
The ModuleConfiguration2 enhance the old ModuleConfiguration with new method to which the server instance id is passed in addition to J2eeModule. The creation code can be more instance specific.
J2eeModuleProvider; made by: dkonecny; issues: #188361
In order to support JRebel and similar technologies it is desirable to be able to turn on Compile on Save but disable Deploy on Save. That is achieved by newly introduced method.
J2eePlatform; made by: phejl; issues: #190387
So far there was just J2eePlatform.getPlatformRoots() with unclear semantics. Now there are explicit getServerHome(), getDomainHome() and getMiddlewareHome() methods in the API. The corresponding SPI has been added - J2eePlatformImpl2.
IncrementalDeployment2; made by: dkonecny; issues: #186331
Implemented both SPI and API for communication of requires libraries from EE module to deployment server.
ServerInitializationException; made by: vkraemer; issues: #141427
OptionalDeploymentManagerFactory gets a new stub, that plugin implementations would override. The Plugin author can assume that the ServerRegistry is initialized to the point where it can support the creation on instances.
LookupProviderSupport; made by: phejl; issues: #140219
Server plugins will use this static method in J2eePlatformImpl.getLookup() method to enable registration of additional Lookup Providers in layer.xml files.
ServerInstance; made by: phejl; issues: #138476
Server instance class provides method isDeployOnSaveSupported in order to fugure out whether deploy on save is supported.
IncrementalDeployment; made by: phejl; issues: #138476
SPI is enhanced by two methods isDeployOnSaveSupported and deployOnSave in order to allow plugin to provide deploy on save functionality.
DeploymentChangeDescriptor; made by: phejl; issues: #138476
Added final class describing the changes during the incremental deployment. New class DeploymentChangeDescriptor implements old interface (AppChangeDescriptor) and should be used in any new API.
ServerInstance; made by: phejl; issues: #133751
API for querying server host, port and flag indicating local installation. This is replacement for terrible hacks querying (leaking) InstanceProperties directly.
ServerInstance; made by: phejl; issues: #135324
API server instance in the API with clear indication that instance was removed should be used in favor of Deployment facade.
J2eePlatformImpl; made by: phejl; issues: #133853
J2eePlatform should provide Lookup containing support for other technologies the server can provide (such as web services).
J2eePlatform; made by: phejl
Methods allows creation of the library form the platform all required files are copied to the new location. Requirement introduced by java ee sharability.
InstanceProperties; made by: vkraemer; issues: #98089
Eliminate completely hard-code timeout for startup, shutdown and deployment operations. Current hard-coded timeouts remain the default for plugins that do not provide per-instance settings.
UISupport; made by: sherold
Added support for getting the default server icons for EAR, EJB, WAR archives and their respective containers (folders).
org.netbeans.modules.j2ee.deployment.plugins.api.StartServer; made by: nnguyen; issues: #53721
This optional method allow plugin to communicate with j2eeserver about the need to restart the server before deployment so that last changes to server configuration would take effect.
ModuleChangeDescriptor; made by: nnguyen; issues: #53539
The summary of changes provided by current ModuleChangeDescriptor is not sufficient in many cases for plugin code to ensure the incrementally deployed application available. This new method getChangedFiles would serve as a 'catch-all' for plugin code to examine details of the changes.
org.netbeans.modules.j2ee.deployment.plugins.api.StartServer; made by: nnguyen; issues: #53010
J2eeserver should be able to start target managed server instances which are not identical with admin server instance. Methods supportsStartTarget, isRunning, startTarget, stopTarget are added as optional to StartServer abstract class plugin SPI.
org.netbeans.modules.j2ee.deployment.plugins.api.DeploymentPlanSplitter; made by: nnguyen
The reason for deprecating is that plugin SPI method
has become exact duplicate with layer.xml entries declaration:
J2EE Server Registry code has now been consolidated
and is no longer depends on this method call;
the require layer.xml entries are used instead.
See Javadoc for details.
org.netbeans.modules.j2ee.deployment.plugins.api.ConfigurationSupport; made by: nnguyen
Added Integration plugin SPI
for plugin to provide services like create CMP/CMR mapping
from generic mapping info acquired by devmodule
wizards. This SPI also allow development modules to notify
plugin on making sure default resources might needs to be
generated for new components.
See Javadoc for details.
ProfilerSupport; made by: phejl; issues: #122430
State constants used in the profiler API were not constants in real - they were just public static variables. This change makes them final.
ProxyOptionalFactory; made by: phejl; issues: #180893
Added class ProxyOptionalFactory which delegates all calls to configured delegate. Via noInitializationFinish it is possible to supress finishInitialization() method when it is not required by the plugin.
Designed to be used from XML Layer.
ProxyDeploymentFactory; made by: phejl; issues: #148177
Added class ProxyDeploymentFactory which delegates all calls to configured delegate. Via urlPattern it is possible to do precheck of server instance uri. The uri has to mach the pattern otherwise the instance is rejected as not supported but the factory.
Designed to be used from XML Layer.
ProxyOptionalFactory; made by: phejl; issues: #182282
Implemented both SPI and API to provide support for server libraries management.