JEE6MetadataClients

Clients of JEE 6 Metadata API

Background

The new metadata model for JEE 6 web applications should be read-only model that merges information from three sources: (1) web.xml, (2) web-fragment.xml files, and (3) annotations (@WebServlet, ...). Client of this metadata model will receive complex information (like "give me all servlets defined for this web application). The API will be kept as minimal as possible, based on required functionality from API clients (NB code).

Need your help

The following table contains modules (and files for each module) that are candidates for usage of metadata model. If you are a module owner or maintainer, please modify the corresponding line in the table. Add your name and provide comment for the module. The comment should state which files should be changed to use metadata model to receive complex information. For example, some usages of j2ee.dd.api.web.WebApp interface are OK, because the client is interested only in information that is inside web.xml file. In other cases, the client may be interested in merged information from all sources (before JEE 6, there was only one source, web.xml, so it was OK to get information from this source only. Now, we have more sources, thus metadata model should be used to get complex (merged) information.). In this case, the client should be modified to use metadata API.

Example

Module "identity.profile.ui" has a file "src/org/netbeans/modules/identity/profile/ui/support/J2eeProjectHelper.java". This file (among other things) reads list of all servlets and finds by class name the servlet that it requires. So, is this file adept for refactoring and usage of new metadata API? Probably yes, but module owner should confirm this. The comment may be "The query for servlet should be chnaged to use metadata model" or "No change required, the file is interested in web.xml data only"...

Please keep in mind that metadata model is read-only. So if the client code is doing some modifications then there are two options: (1) the modifications are done always in web.xml -- no change is required, or (2) modifications are done outside of web.xml. There is no support for programatic change of annotations -- only the user can change them in source code. Also web fragments may be part of library (jar file) and thus no modification is supported. In case when web-fragment is locally placed in project's source code, there should be a way to locate via the metadata API where this definition comes from (location of the web-fragment.xml) and the client may use existing API to modify the fragment (via beans object model).

Typical Use case of DD API

 
Servlet s = new Servlet(); 
s.setServletName(...); 
s.setServletClass(...);
try {
   webApp.addServlet(s);
catch (NameAlreadyUsedException ex) {
   // thrown when servlet-name is alraady in DD
}

in this use case would be useful to check annotations too.


Module Files Owner Comments
identity.profile.ui /src/org/netbeans/modules/identity/profile/ui/support/J2eeProjectHelper.java ???
glassfish.eecommon src/org/netbeans/modules/glassfish/eecommon/api/HttpMonitorHelper.java, src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java vkraemer
j2ee.archive src/org/netbeans/modules/j2ee/archive/wizard/DeployableWizardIterator.java vkraemer
j2ee.ddloaders src/org/netbeans/modules/j2ee/ddloaders/web/DDDataObject.java, DDUtils.java, multiview/ContextParamsTablePanel.java, multiview/DDUtils.java, multiview/EjbRefsTablePanel.java, multiview/EjbRefTableModel.java, multiview/EnvEntriesTablePanel.java, multiview/EnvEntryTableModel.java, multiview/ErrorPagesTableModel.java, multiview/FilterMappingPanel.java, multiview/FilterMappingsTableModel.java, multiview/FilterMappingsTablePanel.java, multiview/FilterPanel.java, multiview/FilterPanelFactory.java, multiview/FilterParamsPanel.java, multiview/FiltersMultiViewElement.java, multiview/InitParamsPanel.java, multiview/InitParamTableModel.java, multiview/JspPGPanel.java, multiview/ListenersTablePanel.java, multiview/ListenerTableModel.java, multiview/LoginConfigPanel.java, multiview/MessageDestRefsTablePanel.java, multiview/MessageDestRefTableModel.java, multiview/OverviewMultiViewElement.java, multiview/OverviewPanel.java, multiview/PagesMultiViewElement.java, multiview/PagesPanelFactory.java, multiview/ReferencesMultiViewElement.java, multiview/ResEnvRefsTablePanel.java, multiview/ResEnvRefTableModel.java, multiview/ResRefsTablePanel.java, multiview/ResRefTableModel.java, multiview/RunAsPanel.java, multiview/SectionValidator.java, multiview/SecurityConstraintPanel.java, multiview/SecurityFactory.java, multiview/SecurityMultiViewElement.java, multiview/SecurityRoleRefTableModel.java, multiview/SecurityRoleTableModel.java, multiview/ServletPanel.java, multiview/ServletPanelFactory.java, multiview/ServletsMultiViewElement.java, multiview/WebResourceCollectionTableModel.java, multiview/WelcomeFilesPanel.java, test/unit/test/DDEditorTest.java Petr S related to web.xml editing
j2ee.ejbcore src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entres/SendJMSMessageCodeGenerator.java, src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entres/UseDatabaseCodeGenerator.java Andrey
j2ee.sun.appsrv81 appsrvbridge/src/org/netbeans/modules/j2ee/sun/bridge/DirectoryDeployment.java vkraemer
j2ee.sun.ddui src/org/netbeans/modules/j2ee/sun/ddloaders/multiview/common/CommonBeanReader.java, src/org/netbeans/modules/j2ee/sun/ddloaders/multiview/common/PortComponentRefMetadataReader.java, src/org/netbeans/modules/j2ee/sun/ddloaders/multiview/web/ServletGroupNode.java, src/org/netbeans/modules/j2ee/sun/ddloaders/multiview/web/ServletMetadataReader.java pcw
j2eeserver test/unit/src/org/netbeans/modules/j2ee/deployment/devmodules/api/J2eeModuleTest.java, j2eeserver/test/unit/src/org/netbeans/tests/j2eeserver/devmodule/TestJ2eeModuleImpl.java Petr H
maven.j2ee src/org/netbeans/modules/maven/j2ee/ear/NonProjectJ2eeModule.java,s rc/org/netbeans/modules/maven/j2ee/ear/NonProjectJ2eeModule.java, src/org/netbeans/modules/maven/j2ee/web/EntRefContainerImpl.java, src/org/netbeans/modules/maven/j2ee/web/WebModuleImpl.java, src/org/netbeans/modules/maven/j2ee/web/WebReplaceTokenProvider.java Milos Kleint
maven.jaxws src/org/netbeans/modules/maven/jaxws/MavenProjectRestSupport.java, src/org/netbeans/modules/maven/jaxws/nodes/JaxWsNode.java, src/org/netbeans/modules/maven/jaxws/WSUtils.java Milan
mobility.end2end src/org/netbeans/modules/mobility/end2end/util/Util.java ???
profiler.j2ee src/org/netbeans/modules/profiler/j2ee/selector/nodes/web/filter/FiltersNode.java, src/org/netbeans/modules/profiler/j2ee/selector/nodes/web/listener/ListenersNode.java, src/org/netbeans/modules/profiler/j2ee/selector/nodes/web/servlet/ServletsNode.java profiler team - ask Petr Suchomel
spring.webmvc src/org/netbeans/modules/spring/webmvc/SpringWebFrameworkProvider.java, src/org/netbeans/modules/spring/webmvc/SpringWebModuleExtender.java ???
tomcat5 src/org/netbeans/modules/tomcat5/ide/DebugSupport.java, src/org/netbeans/modules/tomcat5/ide/MonitorSupport.java Petr H
visualweb.dataconnectivity src/org/netbeans/modules/visualweb/dataconnectivity/naming/DatabaseSettingsImporter.java VW maintainer - ask Alexei Mokeev
visualweb.project.jsf src/org/netbeans/modules/visualweb/project/jsf/api/JsfProjectUtils.java, src/org/netbeans/modules/visualweb/project/jsf/framework/JSFConfigUtilities.java VW maintainer - ask Alexei Mokeev
web.client.javascript.debugger.ant antsrc/org/netbeans/modules/web/client/javascript/debugger/ant/NbJsDebugStart.java JS debugger maintainer, probably noone
web.core src/org/netbeans/modules/web/wizards/DeployData.java, src/org/netbeans/modules/web/wizards/DeployData.java, src/org/netbeans/modules/web/wizards/ListenerIterator.java, src/org/netbeans/modules/web/wizards/ServletData.java  ??? In servlet, filter, listener wizards it would be useful to detect if entry isn't already added by annotations.
web.facelets src/org/netbeans/modules/web/frameworks/facelets/FaceletsFrameworkProvider.java, src/org/netbeans/modules/web/frameworks/facelets/FaceletsUtils.java Alexey
web.freeform src/org/netbeans/modules/web/freeform/WebModules.java David
web.jsf src/org/netbeans/modules/web/jsf/api/ConfigurationUtils.java, src/org/netbeans/modules/web/jsf/JSFConfigUtilities.java, src/org/netbeans/modules/web/jsf/JSFFrameworkProvider.java, src/org/netbeans/modules/web/jsf/wizards/JSFClientGenerator.java Alexey
web.jspparser test/unit/src/org/netbeans/modules/web/jspparser/WebModuleImpl.java Marek F probably knows the most
web.project src/org/netbeans/modules/web/project/api/WebProjectUtilities.java, src/org/netbeans/modules/web/project/jaxws/WebProjectJAXWSSupport.java, src/org/netbeans/modules/web/project/ProjectWebModule.java, src/org/netbeans/modules/web/project/ui/SetExecutionUriAction.java, src/org/netbeans/modules/web/project/WebActionProvider.java, src/org/netbeans/modules/web/project/WebAppMetadataHelper.java, src/org/netbeans/modules/web/project/WebContainerImpl.java, src/org/netbeans/modules/web/project/WebProjectWebServicesClientSupport.java, src/org/netbeans/modules/web/project/WebProjectWebServicesSupport.java, test/unit/src/org/netbeans/modules/web/project/ProjectWebModuleTest.java David
web.refactoring src/org/netbeans/modules/web/refactoring/rename/BaseWebXmlRename.java, src/org/netbeans/modules/web/refactoring/rename/WebXmlFolderMove.java, src/org/netbeans/modules/web/refactoring/rename/WebXmlMove.java, src/org/netbeans/modules/web/refactoring/rename/WebXmlPackageRename.java, src/org/netbeans/modules/web/refactoring/rename/WebXmlRename.java, src/org/netbeans/modules/web/refactoring/safedelete/WebXmlSafeDelete.java, src/org/netbeans/modules/web/refactoring/WebRefactoringFactory.java, src/org/netbeans/modules/web/refactoring/WebXmlRefactoring.java, src/org/netbeans/modules/web/refactoring/whereused/WebXmlWhereUsed.java ???
web.struts src/org/netbeans/modules/web/struts/StrutsConfigUtilities.java, src/org/netbeans/modules/web/struts/StrutsFrameworkProvider.java, src/org/netbeans/modules/web/struts/wizards/ActionPanel1Visual.java ???
websvc.core src/org/netbeans/modules/websvc/core/jaxws/nodes/JaxWsNode.java Milan Currently JAX-WS2.2 doesn't use annotations(so we can live with web.xml only), but according to the discussion with JAX-WS team they plan to make use of Servlet3.0 annotations.
websvc.jaxrpc src/org/netbeans/modules/websvc/jaxrpc/nodes/ConfigureHandlerCookieImpl.java, src/org/netbeans/modules/websvc/jaxrpc/nodes/WebServiceNode.java Milan irrelevant (J2EE1.4 projects)
websvc.kit test/qa-functional/src/org/netbeans/modules/ws/qaf/WsValidation.java  ??? This is test.
websvc.rest src/org/netbeans/modules/websvc/rest/codegen/ClientStubsGenerator.java, src/org/netbeans/modules/websvc/rest/projects/WebProjectRestSupport.java, src/org/netbeans/modules/websvc/rest/wizard/ClientStubsSetupPanelVisual.java Milan Have no answer from REST team yet, but probably they will use annotations in the future (Not yest)
websvc.restapi src/org/netbeans/modules/websvc/rest/spi/WebRestSupport.java Milan - -
websvc.saas.codegen.j2ee src/org/netbeans/modules/websvc/saas/codegen/j2ee/support/J2eeUtil.java Vidhya Narayanan's team The Typical use case here is that some kind of "Login Servlet" is created here and corresp.entries are added to web.xml. This should be replaced by Servlet3.0 annotations. Useful would be to check web.xml+annotations if servlet isn't there already.
websvc.wsitconf src/org/netbeans/modules/websvc/wsitconf/projects/MavenWsitProvider.java, src/org/netbeans/modules/websvc/wsitconf/projects/WebProjectSpecificSecurity.java, src/org/netbeans/modules/websvc/wsitconf/projects/WebProjectSpecificTransport.java, src/org/netbeans/modules/websvc/wsitconf/projects/WebWsitProvider.java, src/org/netbeans/modules/websvc/wsitconf/util/Util.java Martin Grebac
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo