ResourceReferenceBinding

Resource Reference Binding

This document describes the replacement of a modification mechanism of a server-specific configuration based on listening to the changes of standard deployment descriptor model.

The current mechanism, in which server plugins listen to changes made in deployment descriptors and provide necessary modifications in a server-specific configuration, is not satisfactory - there are currently two main problems:

  1. There is no way how to differentiate between changes resulting from execution of Enterprise Actions and manual editing of DD.
  2. There is no strong distinction between resource reference names and corresponding JNDI names specific for a particular Java EE platform.

Basically, there is a need for some additional information provided by a user (e.g. he should provide a resource reference name together with a corresponding JNDI name) to resolve the second issue and this information must be passed to a server plugin to allow modification of a server-specific configuration to resolve the first one.

This document should finally provide a design-level solution of the mentioned problems in terms of new j2eeserver API/SPI and necessary UI changes.

Enterprise Actions include "Use Database" action, "Send JMS Message" action, "Send E-mail" action and "Call Enterprise Bean" action.

"Use Database" use case

User must provide a resource reference name by creating a new reference or selecting from existing references. Here, the difference between a '(resource) reference' and a 'resource' is essential.

Basic Flow

UI Specification

  1. User executes "Use Database" action.
  2. User selects one from the existing reference names. (A2)
  3. User finishes the action.

<<< Data required from a project:

  • the list of data source references (2)

<<< Data required from a server plugin:

  • DS JNDI name for DS reference name (2)
J2eeModuleProvider.ConfigSupport.findDatasourceJndiName(...)
J2eeModuleProvider.ConfigSupport.findDatasourceJndiNameForEjb(...)
  • DS for DS JNDI name (2)
J2eeModuleProvider.ConfigSupport.findDatasource(...)

>>> Data passed to a server plugin:

J2eeModuleProvider.ConfigSupport.bindDatasourceReference(...)
J2eeModuleProvider.ConfigSupport.bindDatasourceReferenceForEjb(...)

Alternative Flow A2

  • A2. If there is no suitable reference name, user may create a new one.
  • A2.1. User provides a new unique reference name.
  • A2.2. User selects one from the existing data sources or creates a new one.
  • A2.3. User finishes the action. The flow returns to the step 2, the created reference is selected.

<<< Data required from a project:

  • the list of resource references (A2.1)

<<< Data required from a server plugin:

  • the list of project data sources (A2.2)
J2eeModuleProvider.getModuleDatasources()
  • the list of server data sources (A2.2)
J2eeModuleProvider.getServerDatasources()

"Create Message-Driven Bean" use case

User must select from the list of destinations or create a new one. The Bean name and the destination JNDI name are passed to a server plugin.

Basic Flow

UI Specification

  1. User invokes "New Message-Driven Bean" wizard.
  2. User selects a destination from the list of availabe destinations. (A2)
  3. User finishes the action. New MBD is created and bound with the selected destination.

<<< Data required from a server plugin:

  • the list of project destinations, i.e. created in A2 and saved in a project (2)
J2eeModuleProvider.ConfigSupport.getMessageDestinations()
  • the list of server destinations, i.e. destinations configured on a server (2)
J2eeModuleProvider.ConfigSupport.getServerMessageDestinations()

>>> Data passed to a server plugin:

J2eeModuleProvider.ConfigSupport.bindMdbToMessageDestination(...)

Alternative Flow A2

  • A2. If there is no suitable destination, user may create a new one.
  • A2.1. User provides a unique destination name.
  • A2.2. User selects the destination type - Queue or Topic.
  • A2.3. User finishes the action. The flow returns to the step 2, the created destination is selected.

<<< Data required from a server plugin:

  • the list of project destinations for the uniqueness verification (A2.1)
J2eeModuleProvider.ConfigSupport.getMessageDestinations()
  • the list of server destinations for the uniqueness verification (A2.1)
J2eeModuleProvider.ConfigSupport.getServerMessageDestinations()

>>> Data passed to a server plugin:

  • new message destination (A2.3)
J2eeModuleProvider.ConfigSupport.supportsCreateMessageDestination()
J2eeModuleProvider.ConfigSupport.createMessageDestination(...)


"Send JMS Message" use case

User must select a destination on the server or a destination bound to a MDB found in an open project.

Basic Flow

UI Specification

  1. User invokes "Send JMS Message" action.
  2. User selects a destination from the list of available destinations. (A2, A3)
  3. User finishes the action.

<<< Data required from a server plugin:

  • the list of project destinations (2)
J2eeModuleProvider.ConfigSupport.getMessageDestinations()
  • the list of server destinations (2)
J2eeModuleProvider.ConfigSupport.getServerMessageDestinations()

>>> Data passed to a server plugin:

J2eeModuleProvider.ConfigSupport.bindMessageDestinationReference(...)
J2eeModuleProvider.ConfigSupport.bindMessageDestinationReferenceForEjb(...)

Alternative Flow A2

same as A2 of "Create Message-Driven Bean" use case

  • A2. If there is no suitable destination, user may create a new one.
  • A2.1 User provides a unique destination name.
  • A2.2 User selects the destination type - Queue or Topic.
  • A2.3. User finishes the action. The flow returns to the step 2, the created destination is selected.

<<< Data required from a server plugin:

  • the list of project destinations for the uniqueness verification (A2.1)
  • the list of server destinations for the uniqueness verification (A2.1)

>>> Data passed to a server plugin:

  • new message destination (A2.3)

Alternative Flow A3

  • A3. User selects a destination that some particular MDB is listening to.
  • A3.1. User selects a MDB from the list of MDBs. The message destination the MDB is listening to is displayed.
  • A3.2. User finishes the action.

<<< Data required from a project:

  • the list of MDBS from open projects (A3.1)

<<< Data required from a server plugin:

  • the message destination a particular MDB is listening to (A3.1)
J2eeModuleProvider.ConfigSupport.findMessageDestinationName(...)
J2eeModuleProvider.ConfigSupport.findMessageDestination(...)

>>> Data passed to a server plugin:

J2eeModuleProvider.ConfigSupport.bindMessageDestinationReference(...)
J2eeModuleProvider.ConfigSupport.bindMessageDestinationReferenceForEjb(...)

"Call Enterprise Bean" use case

User must provide an enterprise bean to be referenced.

Basic Flow

UI Specification

  1. User executes "Call Enterprise Bean" action.
  2. User selects an EJB from the list of EJBs retrieved from opened projects.
  3. User finishes the action.

<<< Data required from a project:

  • the list of EJBs (2)

>>> Data passed to a server plugin:

J2eeModuleProvider.ConfigSupport.bindEjbReference(...)
J2eeModuleProvider.ConfigSupport.bindEjbReferenceForEjb(...)

"Send E-mail" use case

User must provide an e-mail reference name by creating a new reference or selecting from existing e-mail references. Here, the difference between a '(e-mail) (resource) reference' and a '(e-mail) resource' is essential.

Basic Flow

UI Specification

  1. User executes "Send E-mail" action.
  2. User selects an e-email reference from the existing references. (A2)
  3. User finishes the action.

<<< Data required from a project:

  • the list of project e-mail resource references (2)

Alternative Flow A2

  • A2. If there is no suitable e-mail reference, user may create a new one.
  • A2.1. User provides a new unique e-mail reference name.
  • A2.2. User selects one from the existing e-mail resources or creates a new one (not described in this document)
  • A2.3. User finishes the action. The flow returns to the step 2, the created e-mail reference is selected.

<<< Data required from a server plugin:

  • the list of server e-mail resources (A2.2)
  • the list of <e-mail reference name, e-mail resource JNDI name> for the uniqueness verification (A2.1)

<<< Data required from a project:

  • the list of project e-mail resources (A2.2)

>>> Data passed to a server plugin:

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