Building SOA-Based Composite Applications Using NetBeans IDE 6

October 8, 2009

SOA

«»

SQL Service Engine

SQL service engine allows SQL statements to be executed against relational
databases and allows the results of SQL statements to be returned to the client
application or other Service Engines for further processing.

SQL service engine allows SQL DDL (Data Definition Language), SQL DML (Data
Manipulation Language), and stored procedures to be executed against a database.
This, therefore, allows different scenarios to be executed against the database. For
example, obtaining a customer’s address or the number of outstanding invoices a
customer may have.

Within NetBeans, the SQL module is used to interact with the SQL Service Engine.
The SQL module project consists of three artifacts as follows:

  • configuration xml file (connectivityInfo.xml)
  • one or more SQL files containing distinct SQL statements
  • WSDL file describing the SQL operations.

SQL Modules are created by choosing File | New Project and then selecting the
SQL Module option from within the SOA projects category.

Within a SQL Module, there is a configuration file called connectivityInfo.xml
which contains connection details for the database. This can either be specified as a
driver connection or as a JNDI name for a data source.


	<?xml version="1.0" encoding="UTF-8"?>
	<connection>
		<database-url value='jdbc:derby://localhost:1527/db_name'/>
		<jndi-name value=''/>
	</connection>

Each SQL statement that is to be presented to client applications as a new operation
must be stored in a separate SQL file. Using the example scenarios above, we would
have two SQL files with contents shown in the following table:

In order for other JBI components to be able to access our SQL module, we must
have a WSDL file which describes the operations we have defined (customer_
address.sql and outstanding_invoices.sql). NetBeans will generate this file for
us when we select the Generate WSDL option from right-clicking on the project in
the Projects explorer.

SQL Service assembly units cannot be executed directly from within the JBI
container. To execute the SQL Service Unit, it needs to be added as part of
a composite application. This is then called a Service Assembly. Composite
applications are further discussed in Chapter 4.


	Service Assembly: a deployable component (jar file) that consists of a
	collection of Service Units.

IEP Service Engine

The Intelligent Event Processing service engine allows data to be read from an input
source and then processed into a format that can be used for a variety of different
purposes such as reporting or business intelligence information.

For example, an IEP project could be created that takes sales information from a
retail system, collects all information made over the last hour, and then outputs it to
a database table for reporting purposes. This would enable fast reporting based upon
a periodically updated subset of the business data. Any reporting queries performed
would therefore be “off-line” to the business database. This way different reporting
queries could be performed as and when necessary without any performance impact
on the business database.

Depending on the version of NetBeans that you have installed, you may not
automatically have support for creating and editing IEP projects. If you do not
have IEP project support within NetBeans, both the IEP service engine and
NetBeans editor support for IEP projects can be downloaded from http://www.
glassfishwiki.org/jbiwiki/attach/IEPSE/InstallationGuide.zip.

New IEP modules can be created within NetBeans by selecting the File | New
Project
menu option and then selecting the Intelligent Event Processing Module
option within the SOA category as shown in the following figure:

After making the above selections, the second stage of the New Project wizard
allows the Project Name and the Project Location to be specified.

Finally, after creating the new IEP module, new Intelligent Event Processors can
be added to the project. This is achieved by right-clicking on the newly created IEP
project within the NetBeans Project pane and selecting the New | Intelligent Event
Processor
menu option. Selecting this option displays the New Intelligent Event
Processor
wizard which includes one page allowing the IEP File Name and Folder to
be specified.

The IEP Process Editor within NetBeans allows many different processing actions to
be performed on data. IEP Processes are defined using a drag-and-drop editor. The
Palette, which shows all of the operations that can be performed on data, is shown in
the following figure:

IEP Processes (Service Assemblies) cannot be executed directly from within the
JBI container. To execute IEP Processes, they need to be deployed into a Service
Assembly and added as part of a composite application. Composite applications are
further discussed in Chapter 4.

email

«»

Comments

comments