cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Simplify Server Integration Plug-in

02-03-2005

Contributors:
Nam Nguyen
Pavel Buzek

Goals

  1. Allow plugin writers to provide deployment and state management services using Ant facilities available on most server platforms.  This would reduce significantly the number Deployment and Server Integration SPI's plugin needs to write.
  2. Provide basis for pure Ant-based deployment and execution. "Pure" means no callings back into any IDE code during deployment.  This would allow Ant-based headless build to execute without a complete IDE installation.

Constraints

No regressions for the existing tightly integrated plugins (Tomcat5 and AppServer 8.1).  This could be achieved by not requiring existing plugin to provide support for pure Ant-based deployment.  build-imp.xml scripts from J2EE projects will need to handle both j2eeserver-provided Ant tasks (nbdeploy, nbverify) as well as those provided by server platform Ant library jar.

Minimum Required Plugins SPI

With Ant-based deployment and state management, a plugin implementation could be as minimal as following:
  1. RegistrationProvider for server registry UI.
  2. J2eePlatformFactory and J2eePlatformImpl for declaring spec level, library, tool from the platform.
  3. AntSupport to produce ant script 'deploy-[server].xml' and server instance-specific build properties.
  4. Declaration in layer.xml for plugin name, instance url prefix, configuration file list and location of additional deployment information.

Basic configuration descriptor editing is provided by XML editor.  Plugin does not have to provide JSR-88 implementation for deployement and configuration.  However, graphical configuration editing could be provided by plugins with JSR-88 configuration bean implementation.

This minimal requirement is encapsulated by the Plugin Starter Kit module under j2eeserver/pluginkit (branch dev_simple_plugin).

Tasks

  1. Prototyping webproject against TomCat plugin.
  2. Prototyping webproject against App Server 8 plugin.
  3. Prototyping ejbjarproject against Appp Server 8 plugin.
  4. Provide plugin starter kit, as proof of concept and also help reduce learning curve.
  5. Prototyping earproject against App Server 8 plugin.
  6. Provide convenient registry node start or stop server actions based on Ant targets.

Current Status

Task 1-4 are generally completed (except for verify and debug info against App Server 8).  Supported use-cases: run, (re)deploy, debug, run-file, debug-file.  On AppServer 8,  I have ensured both archive-deploy, directory-deploy works.  Start debug server works on Appserver 8,  but attaching failed because there isn't yet a task to get debug info after start server.

Dual deployment support (nbdeploy and server Ant) is now in both webproject and ejbjarproject. Tomcat5 plugin has option (Tools>Options>External Servers>Tomcat 5>Use Catalina Ant) to turn on pure Ant-deployment.

Ear project deployment support is build into deploy-appserver8.xml, but not wired up yet pending earproject's build-impl.xml implementation.  However, if ear build target is designed in line with App Servere 8.1 exploded directory structure inplace deployment will be possible and would likely be simple.

Build NetBean 4.1 with Simple Plugin support

This feature is an on-going effort and under development branch dev_simple_plugin on the following cvs repositories: j2eeserver, web/project, tomcatint, j2ee/ejbjarproject.  The base tag is same as EA2 (QBE200501041900). 

Build steps:

cvs co -r QBE200501041900 nbbuild openide tasklist libs xml vcsgeneric core autoupdate projects debuggercore diff editor vcscore javacvs properties utilities i18n image html usersguide openidex classfile java clazz refactoring junit javadoc beans debuggerjpda ant apisupport form schema2beans httpserver db extbrowser ide jemmy xtest monitor web j2ee websvc objectbrowser mdr

cvs co -r dev_simple_plugin j2eeserver tomcatint

cvs up -r dev_simple_plugin web/project

cvs up -r dev_simple_plugin j2ee/ejbjarproject

cd nbbuild and do ant

edit cluster.properties to add j2eeserver/pluginkit in the same cluster as j2eeserver

cd j2eeserver/pluginkit and do ant



Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems